Remove spaces/tabs from ends of lines.
This commit is contained in:
parent
08e43379e5
commit
aba69144fd
1
Build.c
1
Build.c
|
@ -273,5 +273,4 @@ int Build(char *mddev, int mdfd, int chunk, int level, int layout,
|
||||||
else
|
else
|
||||||
ioctl(mdfd, STOP_MD, 0);
|
ioctl(mdfd, STOP_MD, 0);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
49
util.c
49
util.c
|
@ -73,33 +73,32 @@ struct blkpg_partition {
|
||||||
*/
|
*/
|
||||||
int parse_uuid(char *str, int uuid[4])
|
int parse_uuid(char *str, int uuid[4])
|
||||||
{
|
{
|
||||||
int hit = 0; /* number of Hex digIT */
|
int hit = 0; /* number of Hex digIT */
|
||||||
int i;
|
int i;
|
||||||
char c;
|
char c;
|
||||||
for (i=0; i<4; i++) uuid[i]=0;
|
for (i=0; i<4; i++) uuid[i]=0;
|
||||||
|
|
||||||
while ((c= *str++)) {
|
while ((c= *str++)) {
|
||||||
int n;
|
int n;
|
||||||
if (c>='0' && c<='9')
|
if (c>='0' && c<='9')
|
||||||
n = c-'0';
|
n = c-'0';
|
||||||
else if (c>='a' && c <= 'f')
|
else if (c>='a' && c <= 'f')
|
||||||
n = 10 + c - 'a';
|
n = 10 + c - 'a';
|
||||||
else if (c>='A' && c <= 'F')
|
else if (c>='A' && c <= 'F')
|
||||||
n = 10 + c - 'A';
|
n = 10 + c - 'A';
|
||||||
else if (strchr(":. -", c))
|
else if (strchr(":. -", c))
|
||||||
continue;
|
continue;
|
||||||
else return 0;
|
else return 0;
|
||||||
|
|
||||||
if (hit<32) {
|
if (hit<32) {
|
||||||
uuid[hit/8] <<= 4;
|
uuid[hit/8] <<= 4;
|
||||||
uuid[hit/8] += n;
|
uuid[hit/8] += n;
|
||||||
|
}
|
||||||
|
hit++;
|
||||||
}
|
}
|
||||||
hit++;
|
if (hit == 32)
|
||||||
}
|
return 1;
|
||||||
if (hit == 32)
|
return 0;
|
||||||
return 1;
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -132,7 +131,6 @@ int md_get_version(int fd)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int get_linux_version()
|
int get_linux_version()
|
||||||
{
|
{
|
||||||
struct utsname name;
|
struct utsname name;
|
||||||
|
@ -593,7 +591,6 @@ char *human_size_brief(long long bytes)
|
||||||
{
|
{
|
||||||
static char buf[30];
|
static char buf[30];
|
||||||
|
|
||||||
|
|
||||||
if (bytes < 5000*1024)
|
if (bytes < 5000*1024)
|
||||||
snprintf(buf, sizeof(buf), "%ld.%02ldKiB",
|
snprintf(buf, sizeof(buf), "%ld.%02ldKiB",
|
||||||
(long)(bytes>>10), (long)(((bytes&1023)*100+512)/1024)
|
(long)(bytes>>10), (long)(((bytes&1023)*100+512)/1024)
|
||||||
|
|
Loading…
Reference in New Issue