1 --- busybox-1.00-pre4/miscutils/hdparm.c.orig 2003-11-28 22:55:03.000000000 +0000
2 +++ busybox-1.00-pre4/miscutils/hdparm.c 2003-12-11 14:04:48.000000000 +0000
7 -static void print_ascii(uint16_t *p, uint8_t length);
8 +static void print_ascii(uint16_t *p, uint8_t length) {
12 + /* find first non-space & print it */
13 + for(ii = 0; ii< length; ii++)
15 + if(((char) 0x00ff&((*p)>>8)) != ' ')
17 + if((cl = (char) 0x00ff&(*p)) != ' ')
19 + if_printf((cl != '\0'),"%c",cl);
26 + /* print the rest */
27 + for(; ii< length; ii++)
30 + break; /* some older devices have NULLs */
31 + printf("%c%c",(char)0x00ff&((*p)>>8),(char)(*p)&0x00ff);
37 static void xprint_ascii(uint16_t *val ,int i, char * string, int n)
43 -static void print_ascii(uint16_t *p, uint8_t length) {
47 - /* find first non-space & print it */
48 - for(ii = 0; ii< length; ii++)
50 - if(((char) 0x00ff&((*p)>>8)) != ' ')
52 - if((cl = (char) 0x00ff&(*p)) != ' ')
54 - if_printf((cl != '\0'),"%c",cl);
61 - /* print the rest */
62 - for(; ii< length; ii++)
65 - break; /* some older devices have NULLs */
66 - printf("%c%c",(char)0x00ff&((*p)>>8),(char)(*p)&0x00ff);
72 /* identify() is the only extern function used across two source files. The
73 others, though, were declared in hdparm.c with global scope; since other
74 functions in that file have static (file) scope, I assume the difference is