aboutsummaryrefslogtreecommitdiff
path: root/miscutils/devfsd.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-12-26 10:42:51 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-12-26 10:42:51 +0000
commitbf0a201008671f81c107de72c026b1b84967561d (patch)
treeaf74820b70fa27929fe218c95822c20651b60637 /miscutils/devfsd.c
parent5dd7ef0f37373e397a7160cb431a32ae57f9f7d9 (diff)
downloadbusybox-w32-bf0a201008671f81c107de72c026b1b84967561d.tar.gz
busybox-w32-bf0a201008671f81c107de72c026b1b84967561d.tar.bz2
busybox-w32-bf0a201008671f81c107de72c026b1b84967561d.zip
style fixes
last xcalloc replaced by xzalloc
Diffstat (limited to 'miscutils/devfsd.c')
-rw-r--r--miscutils/devfsd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c
index f39bb7e3f..5435a6a0b 100644
--- a/miscutils/devfsd.c
+++ b/miscutils/devfsd.c
@@ -457,7 +457,7 @@ int devfsd_main (int argc, char **argv)
457 } 457 }
458 458
459 /* strip last / from mount point, so we don't need to check for it later */ 459 /* strip last / from mount point, so we don't need to check for it later */
460 while( argv[1][1]!='\0' && argv[1][strlen(argv[1])-1] == '/' ) 460 while (argv[1][1]!='\0' && argv[1][strlen(argv[1])-1] == '/' )
461 argv[1][strlen(argv[1]) -1] = '\0'; 461 argv[1][strlen(argv[1]) -1] = '\0';
462 462
463 mount_point = argv[1]; 463 mount_point = argv[1];
@@ -557,7 +557,7 @@ static void read_config_file (char *path, int optional, unsigned long *event_mas
557 if ( S_ISDIR (statbuf.st_mode) ) 557 if ( S_ISDIR (statbuf.st_mode) )
558 { 558 {
559 /* strip last / from dirname so we don't need to check for it later */ 559 /* strip last / from dirname so we don't need to check for it later */
560 while( path && path[1]!='\0' && path[strlen(path)-1] == '/') 560 while (path && path[1]!='\0' && path[strlen(path)-1] == '/')
561 path[strlen(path) -1] = '\0'; 561 path[strlen(path) -1] = '\0';
562 562
563 dir_operation(READ_CONFIG, path, 0, event_mask); 563 dir_operation(READ_CONFIG, path, 0, event_mask);
@@ -665,7 +665,7 @@ static void process_config_line (const char *line, unsigned long *event_mask)
665 665
666 i = index_in_str_array(options, what ); 666 i = index_in_str_array(options, what );
667 667
668 switch(i) 668 switch (i)
669 { 669 {
670 case 4: /* "PERMISSIONS" */ 670 case 4: /* "PERMISSIONS" */
671 new->action.what = AC_PERMISSIONS; 671 new->action.what = AC_PERMISSIONS;
@@ -1052,7 +1052,7 @@ static void action_compat (const struct devfsd_notify_struct *info, unsigned int
1052 if( i == 9 ) 1052 if( i == 9 )
1053 snprintf (compat_buf, sizeof (compat_buf), fmt[i], host, bus, target, lun, ptr + 2); 1053 snprintf (compat_buf, sizeof (compat_buf), fmt[i], host, bus, target, lun, ptr + 2);
1054 /* esac */ 1054 /* esac */
1055 } /* switch(action) */ 1055 } /* switch (action) */
1056 1056
1057 if(compat_name == NULL ) 1057 if(compat_name == NULL )
1058 return; 1058 return;
@@ -1073,7 +1073,7 @@ static void action_compat (const struct devfsd_notify_struct *info, unsigned int
1073 debug_msg_logger(LOG_ERR, "unlink: %s: %m", compat_name); 1073 debug_msg_logger(LOG_ERR, "unlink: %s: %m", compat_name);
1074 break; 1074 break;
1075 /*esac*/ 1075 /*esac*/
1076 } /* switch(action) */ 1076 } /* switch (action) */
1077} /* End Function action_compat */ 1077} /* End Function action_compat */
1078 1078
1079static void restore(char *spath, struct stat source_stat, int rootlen) 1079static void restore(char *spath, struct stat source_stat, int rootlen)
@@ -1265,7 +1265,7 @@ static mode_t get_mode (const char *string)
1265 1265
1266 mode = 0; 1266 mode = 0;
1267 i= S_IRUSR; 1267 i= S_IRUSR;
1268 while(i>0) 1268 while (i>0)
1269 { 1269 {
1270 if(string[0]=='r'||string[0]=='w'||string[0]=='x') 1270 if(string[0]=='r'||string[0]=='w'||string[0]=='x')
1271 mode+=i; 1271 mode+=i;
@@ -1381,7 +1381,7 @@ static void dir_operation(int type, const char * dir_name, int var, unsigned lon
1381 debug_msg_logger(LOG_ERR, "%s: %s: %m", __FUNCTION__, path); 1381 debug_msg_logger(LOG_ERR, "%s: %s: %m", __FUNCTION__, path);
1382 continue; 1382 continue;
1383 } 1383 }
1384 switch(type) 1384 switch (type)
1385 { 1385 {
1386 case SERVICE: 1386 case SERVICE:
1387 service(statbuf,path); 1387 service(statbuf,path);
@@ -1710,7 +1710,7 @@ static char get_old_ide_name (unsigned int major, unsigned int minor)
1710 c+=2; 1710 c+=2;
1711 } 1711 }
1712 i++; 1712 i++;
1713 } while(i<=IDE9_MAJOR); 1713 } while (i<=IDE9_MAJOR);
1714 1714
1715 if (minor > 63) 1715 if (minor > 63)
1716 ++letter; 1716 ++letter;