aboutsummaryrefslogtreecommitdiff
path: root/miscutils/devfsd.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-01-28 12:30:24 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-01-28 12:30:24 +0100
commit083e172641b64c564b7ec5478197dccbde43b421 (patch)
treeed2cbfa8c4ad1c39a25c84bce8eb6ff224b623ed /miscutils/devfsd.c
parent6b9f1633537e2ff06eb1a0741e4598a294f40fcb (diff)
downloadbusybox-w32-083e172641b64c564b7ec5478197dccbde43b421.tar.gz
busybox-w32-083e172641b64c564b7ec5478197dccbde43b421.tar.bz2
busybox-w32-083e172641b64c564b7ec5478197dccbde43b421.zip
style fixes, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils/devfsd.c')
-rw-r--r--miscutils/devfsd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c
index 5e3ee23b3..62f5de8b6 100644
--- a/miscutils/devfsd.c
+++ b/miscutils/devfsd.c
@@ -637,7 +637,7 @@ static int do_servicing(int fd, unsigned long event_mask)
637 xioctl(fd, DEVFSDIOC_SET_EVENT_MASK, (void*)event_mask); 637 xioctl(fd, DEVFSDIOC_SET_EVENT_MASK, (void*)event_mask);
638 while (!caught_signal) { 638 while (!caught_signal) {
639 errno = 0; 639 errno = 0;
640 bytes = read(fd,(char *) &info, sizeof info); 640 bytes = read(fd, (char *) &info, sizeof info);
641 if (caught_signal) 641 if (caught_signal)
642 break; /* Must test for this first */ 642 break; /* Must test for this first */
643 if (errno == EINTR) 643 if (errno == EINTR)
@@ -941,10 +941,10 @@ static void restore(char *spath, struct stat source_stat, int rootlen)
941 lstat(dpath, &dest_stat); 941 lstat(dpath, &dest_stat);
942 free(dpath); 942 free(dpath);
943 if (S_ISLNK(source_stat.st_mode) || (source_stat.st_mode & S_ISVTX)) 943 if (S_ISLNK(source_stat.st_mode) || (source_stat.st_mode & S_ISVTX))
944 copy_inode(dpath, &dest_stat,(source_stat.st_mode & ~S_ISVTX) , spath, &source_stat); 944 copy_inode(dpath, &dest_stat, (source_stat.st_mode & ~S_ISVTX), spath, &source_stat);
945 945
946 if (S_ISDIR(source_stat.st_mode)) 946 if (S_ISDIR(source_stat.st_mode))
947 dir_operation(RESTORE, spath, rootlen,NULL); 947 dir_operation(RESTORE, spath, rootlen, NULL);
948} 948}
949 949
950 950
@@ -995,7 +995,7 @@ static int copy_inode(const char *destpath, const struct stat *dest_stat,
995 break; 995 break;
996 un_addr.sun_family = AF_UNIX; 996 un_addr.sun_family = AF_UNIX;
997 snprintf(un_addr.sun_path, sizeof(un_addr.sun_path), "%s", destpath); 997 snprintf(un_addr.sun_path, sizeof(un_addr.sun_path), "%s", destpath);
998 val = bind(fd,(struct sockaddr *) &un_addr,(int) sizeof un_addr); 998 val = bind(fd, (struct sockaddr *) &un_addr, (int) sizeof un_addr);
999 close(fd); 999 close(fd);
1000 if (val != 0 || chmod(destpath, new_mode & ~S_IFMT) != 0) 1000 if (val != 0 || chmod(destpath, new_mode & ~S_IFMT) != 0)
1001 break; 1001 break;
@@ -1432,7 +1432,7 @@ const char *get_old_name(const char *devname, unsigned int namelen,
1432 1432
1433 /* 2 ==scsi/disc, 4 == scsi/part */ 1433 /* 2 ==scsi/disc, 4 == scsi/part */
1434 if (i == 2 || i == 4) 1434 if (i == 2 || i == 4)
1435 compat_name = write_old_sd_name(buffer, major, minor,((i == 2) ? "" : (ptr + 4))); 1435 compat_name = write_old_sd_name(buffer, major, minor, ((i == 2) ? "" : (ptr + 4)));
1436 1436
1437 /* 5 == scsi/mt */ 1437 /* 5 == scsi/mt */
1438 if (i == 5) { 1438 if (i == 5) {
@@ -1652,7 +1652,7 @@ static const char *expand_variable(char *buffer, unsigned int length,
1652 ch = input[0]; 1652 ch = input[0];
1653 if (ch == '$') { 1653 if (ch == '$') {
1654 /* Special case for "$$": PID */ 1654 /* Special case for "$$": PID */
1655 sprintf(tmp, "%d",(int) getpid()); 1655 sprintf(tmp, "%d", (int) getpid());
1656 len = strlen(tmp); 1656 len = strlen(tmp);
1657 if (len + *out_pos >= length) 1657 if (len + *out_pos >= length)
1658 goto expand_variable_out; 1658 goto expand_variable_out;