hdparm: whitespace style fixes

This commit is contained in:
Denis Vlasenko 2007-03-28 00:14:01 +00:00
parent 6a5598c2bc
commit f1ba749509

View File

@ -1200,7 +1200,7 @@ static void dump_identity(const struct hd_driveid *id)
if (id->dma_ultra & 0x0080) printf("udma7 ");
}
}
printf("\n AdvancedPM=%s",((id_regs[83]&8)==0)?"no":"yes");
printf("\n AdvancedPM=%s", (!(id_regs[83] & 8)) ? "no" : "yes");
if (id_regs[83] & 8) {
if (!(id_regs[86] & 8))
printf(": disabled (255)");
@ -1292,6 +1292,8 @@ static void do_time(int flag, int fd)
flag = 1 time_device
*/
{
static const struct itimerval thousand = {{1000, 0}, {1000, 0}};
struct itimerval e1, e2;
double elapsed, elapsed2;
unsigned int max_iterations = 1024, total_MB, iterations;
@ -1311,7 +1313,7 @@ static void do_time(int flag, int fd)
sync();
sleep(3);
setitimer(ITIMER_REAL, &(struct itimerval){{1000,0},{1000,0}}, NULL);
setitimer(ITIMER_REAL, &thousand, NULL);
if (flag == 0) {
/* Time cache */
@ -1755,8 +1757,7 @@ static void process_dev(char *devname)
#if ENABLE_FEATURE_HDPARM_HDIO_GETSET_DMA
if (get_dma) {
if (!bb_ioctl(fd, HDIO_GET_DMA, &parm, "HDIO_GET_DMA"))
{
if (!bb_ioctl(fd, HDIO_GET_DMA, &parm, "HDIO_GET_DMA")) {
printf(fmt, "using_dma", parm);
if (parm == 8)
printf(" (DMA-Assisted-PIO)\n");
@ -1934,7 +1935,8 @@ static void parse_xfermode(int flag, unsigned long *get, unsigned long *set, int
if (flag) {
*get = 1;
if (optarg) {
*set = ((*value = translate_xfermode(optarg)) > -1);
*value = translate_xfermode(optarg);
*set = (*value > -1);
}
}
}
@ -1960,8 +1962,6 @@ static const char hdparm_options[] = "gfu::n::p:r::m::c::k::a::B:tTh"
/*-------------------------------------*/
/* our main() routine: */
int hdparm_main(int argc, char **argv) ATTRIBUTE_NORETURN;;
int hdparm_main(int argc, char **argv) ATTRIBUTE_NORETURN;
int hdparm_main(int argc, char **argv);
int hdparm_main(int argc, char **argv)
{
@ -2031,18 +2031,17 @@ int hdparm_main(int argc, char **argv)
get_mult = get_io32bit = get_unmask = get_keep = get_readonly = get_readahead = get_geom = 1;
USE_FEATURE_HDPARM_HDIO_GETSET_DMA(get_dma = 1);
}
argc -= optind;
argv += optind;
if (argc < 1) {
if (!*argv) {
if (ENABLE_FEATURE_HDPARM_GET_IDENTITY && !isatty(STDIN_FILENO))
identify_from_stdin(); /* EXIT */
else bb_show_usage();
}
while (argc--) {
process_dev(*argv);
argv++;
}
exit(EXIT_SUCCESS);
do {
process_dev(*argv++);
} while (*argv);
return EXIT_SUCCESS;
}