Style (9) fixes, spaces to tabs.
Fix style issues noticed when I went to MFC r257820 MFC after: 2 days X-MFC-With: r257820 Sponsored by: Multiplay
This commit is contained in:
parent
9dc0698640
commit
760632e68b
@ -68,7 +68,7 @@ mfi_ctrl_set_properties(int fd, struct mfi_ctrl_props *info)
|
|||||||
static int
|
static int
|
||||||
mfi_ctrl_rebuild_rate(int ac, char **av)
|
mfi_ctrl_rebuild_rate(int ac, char **av)
|
||||||
{
|
{
|
||||||
int error, fd;
|
int error, fd;
|
||||||
struct mfi_ctrl_props ctrl_props;
|
struct mfi_ctrl_props ctrl_props;
|
||||||
|
|
||||||
if (ac > 2) {
|
if (ac > 2) {
|
||||||
@ -76,40 +76,40 @@ mfi_ctrl_rebuild_rate(int ac, char **av)
|
|||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
fd = mfi_open(mfi_unit, O_RDWR);
|
fd = mfi_open(mfi_unit, O_RDWR);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
error = errno;
|
error = errno;
|
||||||
warn("mfi_open");
|
warn("mfi_open");
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
error = mfi_ctrl_get_properties(fd, &ctrl_props);
|
error = mfi_ctrl_get_properties(fd, &ctrl_props);
|
||||||
if ( error < 0) {
|
if ( error < 0) {
|
||||||
error = errno;
|
error = errno;
|
||||||
warn("Failed to get controller properties");
|
warn("Failed to get controller properties");
|
||||||
close(fd);
|
close(fd);
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* User requested a change to the rebuild rate
|
* User requested a change to the rebuild rate
|
||||||
*/
|
*/
|
||||||
if (ac > 1) {
|
if (ac > 1) {
|
||||||
ctrl_props.rebuild_rate = atoi(av[ac - 1]);
|
ctrl_props.rebuild_rate = atoi(av[ac - 1]);
|
||||||
error = mfi_ctrl_set_properties(fd, &ctrl_props);
|
error = mfi_ctrl_set_properties(fd, &ctrl_props);
|
||||||
if ( error < 0) {
|
if ( error < 0) {
|
||||||
error = errno;
|
error = errno;
|
||||||
warn("Failed to set controller properties");
|
warn("Failed to set controller properties");
|
||||||
close(fd);
|
close(fd);
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
error = mfi_ctrl_get_properties(fd, &ctrl_props);
|
error = mfi_ctrl_get_properties(fd, &ctrl_props);
|
||||||
if ( error < 0) {
|
if ( error < 0) {
|
||||||
error = errno;
|
error = errno;
|
||||||
warn("Failed to get controller properties");
|
warn("Failed to get controller properties");
|
||||||
close(fd);
|
close(fd);
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf ("controller rebuild rate: %%%u \n",
|
printf ("controller rebuild rate: %%%u \n",
|
||||||
ctrl_props.rebuild_rate);
|
ctrl_props.rebuild_rate);
|
||||||
@ -120,7 +120,7 @@ MFI_COMMAND(ctrlprop, rebuild, mfi_ctrl_rebuild_rate);
|
|||||||
static int
|
static int
|
||||||
mfi_ctrl_alarm_enable(int ac, char **av)
|
mfi_ctrl_alarm_enable(int ac, char **av)
|
||||||
{
|
{
|
||||||
int error, fd;
|
int error, fd;
|
||||||
struct mfi_ctrl_props ctrl_props;
|
struct mfi_ctrl_props ctrl_props;
|
||||||
|
|
||||||
if (ac > 2) {
|
if (ac > 2) {
|
||||||
@ -128,40 +128,40 @@ mfi_ctrl_alarm_enable(int ac, char **av)
|
|||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
fd = mfi_open(mfi_unit, O_RDWR);
|
fd = mfi_open(mfi_unit, O_RDWR);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
error = errno;
|
error = errno;
|
||||||
warn("mfi_open");
|
warn("mfi_open");
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
error = mfi_ctrl_get_properties(fd, &ctrl_props);
|
error = mfi_ctrl_get_properties(fd, &ctrl_props);
|
||||||
if ( error < 0) {
|
if ( error < 0) {
|
||||||
error = errno;
|
error = errno;
|
||||||
warn("Failed to get controller properties");
|
warn("Failed to get controller properties");
|
||||||
close(fd);
|
close(fd);
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
printf ("controller alarm was : %s\n",
|
printf ("controller alarm was : %s\n",
|
||||||
(ctrl_props.alarm_enable ? "enabled" : "disabled"));
|
(ctrl_props.alarm_enable ? "enabled" : "disabled"));
|
||||||
|
|
||||||
if (ac > 1) {
|
if (ac > 1) {
|
||||||
ctrl_props.alarm_enable = atoi(av[ac - 1]);
|
ctrl_props.alarm_enable = atoi(av[ac - 1]);
|
||||||
error = mfi_ctrl_set_properties(fd, &ctrl_props);
|
error = mfi_ctrl_set_properties(fd, &ctrl_props);
|
||||||
if ( error < 0) {
|
if ( error < 0) {
|
||||||
error = errno;
|
error = errno;
|
||||||
warn("Failed to set controller properties");
|
warn("Failed to set controller properties");
|
||||||
close(fd);
|
close(fd);
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
error = mfi_ctrl_get_properties(fd, &ctrl_props);
|
error = mfi_ctrl_get_properties(fd, &ctrl_props);
|
||||||
if ( error < 0) {
|
if ( error < 0) {
|
||||||
error = errno;
|
error = errno;
|
||||||
warn("Failed to get controller properties");
|
warn("Failed to get controller properties");
|
||||||
close(fd);
|
close(fd);
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf ("controller alarm was : %s\n",
|
printf ("controller alarm was : %s\n",
|
||||||
(ctrl_props.alarm_enable ? "enabled" : "disabled"));
|
(ctrl_props.alarm_enable ? "enabled" : "disabled"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user