aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/eject.c2
-rw-r--r--miscutils/hdparm.c18
-rw-r--r--miscutils/strings.c2
3 files changed, 9 insertions, 13 deletions
diff --git a/miscutils/eject.c b/miscutils/eject.c
index ff23b1666..8e37c84b5 100644
--- a/miscutils/eject.c
+++ b/miscutils/eject.c
@@ -28,7 +28,7 @@
28int eject_main(int argc, char **argv) 28int eject_main(int argc, char **argv)
29{ 29{
30 unsigned long flags; 30 unsigned long flags;
31 char *device; 31 const char *device;
32 int dev, cmd; 32 int dev, cmd;
33 33
34 opt_complementary = "?:?1:t--T:T--t"; 34 opt_complementary = "?:?1:t--T:T--t";
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index e60e642d6..afb4ecc7b 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -463,9 +463,7 @@ static void on_off(unsigned int value);
463 463
464static void print_flag_on_off(unsigned long get_arg, const char *s, unsigned long arg) 464static void print_flag_on_off(unsigned long get_arg, const char *s, unsigned long arg)
465{ 465{
466 466 if (get_arg) {
467 if (get_arg)
468 {
469 printf(" setting %s to %ld", s, arg); 467 printf(" setting %s to %ld", s, arg);
470 on_off(arg); 468 on_off(arg);
471 } 469 }
@@ -476,8 +474,7 @@ static void bb_ioctl_on_off(int fd, int request, void *argp, const char *string,
476{ 474{
477 if (ioctl(fd, request, &argp) != 0) 475 if (ioctl(fd, request, &argp) != 0)
478 bb_perror_msg(" %s", string); 476 bb_perror_msg(" %s", string);
479 else 477 else {
480 {
481 printf(" %s\t= %2ld", str, (unsigned long) argp); 478 printf(" %s\t= %2ld", str, (unsigned long) argp);
482 on_off((unsigned long) argp); 479 on_off((unsigned long) argp);
483 } 480 }
@@ -486,16 +483,15 @@ static void bb_ioctl_on_off(int fd, int request, void *argp, const char *string,
486#ifdef CONFIG_FEATURE_HDPARM_GET_IDENTITY 483#ifdef CONFIG_FEATURE_HDPARM_GET_IDENTITY
487static void print_ascii(uint16_t *p, uint8_t length); 484static void print_ascii(uint16_t *p, uint8_t length);
488 485
489static void xprint_ascii(uint16_t *val ,int i, char * string, int n) 486static void xprint_ascii(uint16_t *val ,int i, const char *string, int n)
490{ 487{
491 if (val[i]) 488 if (val[i]) {
492 { 489 printf("\t%-20s", string);
493 printf("\t%-20s",string);
494 print_ascii(&val[i], n); 490 print_ascii(&val[i], n);
495 } 491 }
496} 492}
497#endif 493#endif
498/* end of busybox specific stuff */ 494/* end of busybox specific stuff */
499 495
500#ifdef CONFIG_FEATURE_HDPARM_GET_IDENTITY 496#ifdef CONFIG_FEATURE_HDPARM_GET_IDENTITY
501static uint8_t mode_loop(uint16_t mode_sup, uint16_t mode_sel, int cc, uint8_t *have_mode) 497static uint8_t mode_loop(uint16_t mode_sup, uint16_t mode_sel, int cc, uint8_t *have_mode)
@@ -1587,7 +1583,7 @@ static void interpret_xfermode(unsigned int xfermode)
1587} 1583}
1588#endif /* HDIO_DRIVE_CMD */ 1584#endif /* HDIO_DRIVE_CMD */
1589 1585
1590static void print_flag(unsigned long flag, char *s, unsigned long value) 1586static void print_flag(unsigned long flag, const char *s, unsigned long value)
1591{ 1587{
1592 if (flag) 1588 if (flag)
1593 printf(" setting %s to %ld\n", s, value); 1589 printf(" setting %s to %ld\n", s, value);
diff --git a/miscutils/strings.c b/miscutils/strings.c
index 0d5576e9b..691502dab 100644
--- a/miscutils/strings.c
+++ b/miscutils/strings.c
@@ -26,7 +26,7 @@ int strings_main(int argc, char **argv)
26 FILE *file = stdin; 26 FILE *file = stdin;
27 char *string; 27 char *string;
28 const char *fmt = "%s: "; 28 const char *fmt = "%s: ";
29 char *n_arg = "4"; 29 const char *n_arg = "4";
30 30
31 opt = getopt32(argc, argv, "afon:", &n_arg); 31 opt = getopt32(argc, argv, "afon:", &n_arg);
32 /* -a is our default behaviour */ 32 /* -a is our default behaviour */