diff options
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/Config.in | 2 | ||||
-rw-r--r-- | miscutils/hdparm.c | 44 | ||||
-rw-r--r-- | miscutils/less.c | 22 | ||||
-rw-r--r-- | miscutils/readahead.c | 2 | ||||
-rw-r--r-- | miscutils/strings.c | 2 |
5 files changed, 36 insertions, 36 deletions
diff --git a/miscutils/Config.in b/miscutils/Config.in index dc3da6f..50ed4df 100644 --- a/miscutils/Config.in +++ b/miscutils/Config.in @@ -292,7 +292,7 @@ config CONFIG_READAHEAD significantly speed up system startup. As readahead(2) blocks until each file has been read, it is best to - run this applet as a background job. + run this applet as a background job. config CONFIG_RUNLEVEL bool "runlevel" diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index 1febcef..97f1b57 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c @@ -755,7 +755,7 @@ static void identify(uint16_t *id_supplied) strng = "<=10ms with INTRQ"; else if ((val[GEN_CONFIG] & DRQ_RESPONSE_TIME) == DRQ_50US_VAL) strng ="50us"; - else + else strng = "Unknown"; printf("\tDRQ response: %s\n\tPacket size: ", strng); /* Data Request (DRQ) */ @@ -817,7 +817,7 @@ static void identify(uint16_t *id_supplied) if (bbbig > 1000) printf("(%"PRIu64" GB)\n", bbbig/1000); - else + else printf("\n"); } @@ -833,8 +833,8 @@ static void identify(uint16_t *id_supplied) if (like_std != 1) { - printf("IORDY%s(can%s be disabled)\n", - !(val[CAPAB_0] & IORDY_SUP) ? "(may be)" : "", + printf("IORDY%s(can%s be disabled)\n", + !(val[CAPAB_0] & IORDY_SUP) ? "(may be)" : "", (val[CAPAB_0] & IORDY_OFF) ? "" :"not"); } else @@ -843,7 +843,7 @@ static void identify(uint16_t *id_supplied) if ((like_std == 1) && val[BUF_TYPE]) { printf("\tBuffer type: %04x: %s%s\n", val[BUF_TYPE], - (val[BUF_TYPE] < 2) ? "single port, single-sector" : "dual port, multi-sector", + (val[BUF_TYPE] < 2) ? "single port, single-sector" : "dual port, multi-sector", (val[BUF_TYPE] > 2) ? " with read caching ability" : ""); } @@ -1063,9 +1063,9 @@ static void identify(uint16_t *id_supplied) strng = " determined by the jumper"; else if ((jj & DEV_DET) == CSEL_VAL) strng = " determined by CSEL"; - else + else strng = ""; - printf("HW reset results:\n\tCBLID- %s Vih\n\tDevice num = %i%s\n", + printf("HW reset results:\n\tCBLID- %s Vih\n\tDevice num = %i%s\n", (val[HWRST_RSLT] & CBLID) ? "above" : "below", !(oo), strng); } @@ -1200,8 +1200,8 @@ static void dump_identity(const struct hd_driveid *id) printf(" (maybe):"); printf(" CurCHS=%u/%u/%u, CurSects=%lu, LBA=%s",id->cur_cyls, id->cur_heads, - id->cur_sectors, - (BB_BIG_ENDIAN) ? + id->cur_sectors, + (BB_BIG_ENDIAN) ? (long unsigned int)(id->cur_capacity0 << 16) | id->cur_capacity1 : (long unsigned int)(id->cur_capacity1 << 16) | id->cur_capacity0, ((id->capability&2) == 0) ? "no" : "yes"); @@ -1213,7 +1213,7 @@ static void dump_identity(const struct hd_driveid *id) if (((id->capability&8) || (id->field_valid&2)) && id->field_valid&2) printf(", tPIO={min:%u,w/IORDY:%u}", id->eide_pio, id->eide_pio_iordy); - + if ((id->capability&1) && (id->field_valid&2)) printf(", tDMA={min:%u,rec:%u}", id->eide_dma_min, id->eide_dma_time); @@ -1254,7 +1254,7 @@ static void dump_identity(const struct hd_driveid *id) } } if (((id->capability&8) || (id->field_valid&2)) && id->field_valid&4) - { + { printf("\n UDMA modes: "); if (id->dma_ultra & 0x100) printf("*"); if (id->dma_ultra & 0x001) printf("udma0 "); @@ -1399,7 +1399,7 @@ static void do_time(int flag, int fd) if (read_big_block (fd, buf)) return; printf(" Timing cached reads: "); fflush(stdout); - + /* Now do the timing */ iterations = 0; getitimer(ITIMER_REAL, &e1); @@ -1422,9 +1422,9 @@ static void do_time(int flag, int fd) elapsed2 = (e1.it_value.tv_sec - e2.it_value.tv_sec) + ((e1.it_value.tv_usec - e2.it_value.tv_usec) / 1000000.0); } while (--iterations); - + elapsed -= elapsed2; - print_timing(BUFCACHE_FACTOR * total_MB, elapsed); + print_timing(BUFCACHE_FACTOR * total_MB, elapsed); flush_buffer_cache(fd); sleep(1); } @@ -1447,7 +1447,7 @@ static void do_time(int flag, int fd) elapsed = (e1.it_value.tv_sec - e2.it_value.tv_sec) + ((e1.it_value.tv_usec - e2.it_value.tv_usec) / 1000000.0); } while (elapsed < 3.0 && iterations < max_iterations); - + total_MB = iterations * TIMING_BUF_MB; print_timing(total_MB, elapsed); } @@ -2124,7 +2124,7 @@ int hdparm_main(int argc, char **argv) do_flush |= do_timings |= (c == 't'); do_flush |= do_ctimings |= (c == 'T'); #ifdef HDIO_DRIVE_CMD - if (c == 'S') parse_opts(&get_standby, &set_standby, &standby_requested, 0, INT_MAX); + if (c == 'S') parse_opts(&get_standby, &set_standby, &standby_requested, 0, INT_MAX); if (c == 'D') parse_opts(&get_defects, &set_defects, &defects, 0, INT_MAX); if (c == 'P') parse_opts(&get_prefetch, &set_prefetch, &prefetch, 0, INT_MAX); parse_xfermode((c == 'X'), &get_xfermode, &set_xfermode, &xfermode_requested); @@ -2138,22 +2138,22 @@ int hdparm_main(int argc, char **argv) reread_partn |= (c == 'z'); get_seagate = set_seagate |= (c == 'Z'); #endif - USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF(if (c == 'U') parse_opts(NULL, &unregister_hwif, &hwif, 0, INT_MAX)); + USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF(if (c == 'U') parse_opts(NULL, &unregister_hwif, &hwif, 0, INT_MAX)); #ifdef HDIO_GET_QDMA if (c == 'Q') { #ifdef HDIO_SET_QDMA parse_opts(&get_dma_q, &set_dma_q, &dma_q, 0, INT_MAX); #else - parse_opts(&get_dma_q, NULL, NULL, 0, 0); + parse_opts(&get_dma_q, NULL, NULL, 0, 0); #endif } -#endif +#endif USE_FEATURE_HDPARM_HDIO_DRIVE_RESET(perform_reset = (c == 'r')); - USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF(if (c == 'x') parse_opts(NULL, &perform_tristate, &tristate, 0, 1)); - USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF(if (c == 'b') parse_opts(&get_busstate, &set_busstate, &busstate, 0, 2)); + USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF(if (c == 'x') parse_opts(NULL, &perform_tristate, &tristate, 0, 1)); + USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF(if (c == 'b') parse_opts(&get_busstate, &set_busstate, &busstate, 0, 2)); #if ENABLE_FEATURE_HDPARM_HDIO_SCAN_HWIF if (c == 'R') { - parse_opts(NULL, &scan_hwif, &hwif_data, 0, INT_MAX); + parse_opts(NULL, &scan_hwif, &hwif_data, 0, INT_MAX); hwif_ctrl = bb_xgetlarg((argv[optind]) ? argv[optind] : "", 10, 0, INT_MAX); hwif_irq = bb_xgetlarg((argv[optind+1]) ? argv[optind+1] : "", 10, 0, INT_MAX); /* Move past the 2 additional arguments */ diff --git a/miscutils/less.c b/miscutils/less.c index c13d7b8..bde2a45 100644 --- a/miscutils/less.c +++ b/miscutils/less.c @@ -610,26 +610,26 @@ static char *process_regex_on_line(char *line, regex_t *pattern, int action) match_found = 0; match_status = regexec(pattern, line2, 1, &match_structs, 0); - + while (match_status == 0) { if (match_found == 0) match_found = 1; - + if (action) { - growline = xasprintf("%s%.*s%s%.*s%s", growline, match_structs.rm_so, line2, HIGHLIGHT, match_structs.rm_eo - match_structs.rm_so, line2 + match_structs.rm_so, NORMAL); + growline = xasprintf("%s%.*s%s%.*s%s", growline, match_structs.rm_so, line2, HIGHLIGHT, match_structs.rm_eo - match_structs.rm_so, line2 + match_structs.rm_so, NORMAL); } else { growline = xasprintf("%s%.*s%.*s", growline, match_structs.rm_so - 4, line2, match_structs.rm_eo - match_structs.rm_so, line2 + match_structs.rm_so); } - + line2 += match_structs.rm_eo; match_status = regexec(pattern, line2, 1, &match_structs, REG_NOTBOL); } - + growline = xasprintf("%s%s", growline, line2); - + return (match_found ? growline : line); - + free(growline); free(line2); } @@ -656,7 +656,7 @@ static void regex_process(void) putchar((match_backwards) ? '?' : '/'); uncomp_regex[0] = 0; fgets(uncomp_regex, sizeof(uncomp_regex), inp); - + if (strlen(uncomp_regex) == 1) { if (num_matches) goto_match(match_backwards ? match_pos - 1 : match_pos + 1); @@ -665,7 +665,7 @@ static void regex_process(void) return; } uncomp_regex[strlen(uncomp_regex) - 1] = '\0'; - + /* Compile the regex and check for errors */ xregcomp(&pattern, uncomp_regex, 0); @@ -677,7 +677,7 @@ static void regex_process(void) } } old_pattern = pattern; - + /* Reset variables */ match_lines = xrealloc(match_lines, sizeof(int)); match_lines[0] = -1; @@ -694,7 +694,7 @@ static void regex_process(void) j++; } } - + num_matches = j; if ((match_lines[0] != -1) && (num_flines > height - 2)) { if (match_backwards) { diff --git a/miscutils/readahead.c b/miscutils/readahead.c index 8221bb4..49cd7fd 100644 --- a/miscutils/readahead.c +++ b/miscutils/readahead.c @@ -22,7 +22,7 @@ int readahead_main(int argc, char **argv) while (*++argv) { if ((f = bb_wfopen(*argv, "r")) != NULL) { int r, fd=fileno(f); - + r = readahead(fd, 0, fdlength(fd)); fclose(f); if (r >= 0) continue; diff --git a/miscutils/strings.c b/miscutils/strings.c index 9a76c85..e9f335e 100644 --- a/miscutils/strings.c +++ b/miscutils/strings.c @@ -3,7 +3,7 @@ * strings implementation for busybox * * Copyright Tito Ragusa <farmatito@tiscali.it> - * + * * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. */ |