overall trivial trivial cleanup
PATCH 1/1 overall trivial trivial cleanup
Here I try to make the style a bit more consistant in the different files, so that new patches just copy the 'right' one :)
Some "magic" numbers are replaced and udevtest.c is catched up with udev.
thanks,
Kay
===== logging.h 1.11 vs edited =====
logging.h +4 -2
@@ -34,6 +34,8 @@#include <unistd.h> #include <syslog.h> +#define LOGNAME_SIZE 42 +#undef info #define info(format, arg...) \ do { \
@@ -61,12 +63,12 @@ __attribute__ ((format (printf, 2, 3)));/* each program that uses syslog must declare this variable somewhere */ -extern unsigned char logname[42 ]; +extern unsigned char logname[LOGNAME_SIZE ];#undef init_loggingstatic inline void init_logging (char *program_name) { -snprintf (logname,42 ,"%s[%d]" , program_name,getpid ()); +snprintf (logname,LOGNAME_SIZE ,"%s[%d]" , program_name,getpid ());openlog (logname,0 ,LOG_DAEMON ); }
===== namedev_parse.c 1.29 vs edited =====
namedev_parse.c +0 -1
@@ -58,7 +58,6 @@void dump_config_dev (struct config_device *dev) { -/*FIXME dump all sysfs's */ dbg_parse("name='%s', symlink='%s', bus='%s', place='%s', id='%s', " "sysfs_file[0]='%s', sysfs_value[0]='%s', " "kernel='%s', program='%s', result='%s'",
===== udev.c 1.51 vs edited =====
udev.c +3 -3
@@ -40,7 +40,7 @@char **main_envp;#ifdef LOG -unsigned char logname[42 ]; +unsigned char logname[LOGNAME_SIZE ];void log_message (int level,const char *format, ...) {va_list args;
@@ -74,7 +74,7 @@"usb_host" ,"pci_bus" ,"pcmcia_socket" , - "", + "" };static int udev_hotplug (void )
@@ -164,7 +164,7 @@return -retval; } -int main (int argc,char **argv,char **envp) +int main (int argc,char *argv[],char *envp[]) { main_argv = argv; main_envp = envp;
===== udevd.c 1.22 vs edited =====
udevd.c +1 -1
@@ -52,7 +52,7 @@static void msg_queue_manager (void );#ifdef LOG -unsigned char logname[42 ]; +unsigned char logname[LOGNAME_SIZE ];void log_message (int level,const char *format, ...) {va_list args;
===== udevinfo.c 1.16 vs edited =====
udevinfo.c +1 -1
@@ -41,7 +41,7 @@int main_argc;#ifdef LOG -unsigned char logname[42 ]; +unsigned char logname[LOGNAME_SIZE ];void log_message (int level,const char *format, ...) {va_list args;
===== udevsend.c 1.26 vs edited =====
udevsend.c +1 -1
@@ -41,7 +41,7 @@#include "logging.h" #ifdef LOG -unsigned char logname[42 ]; +unsigned char logname[LOGNAME_SIZE ];void log_message (int level,const char *format, ...) {va_list args;
===== udevstart.c 1.2 vs edited =====
udevstart.c +2 -2
@@ -34,7 +34,7 @@#ifdef LOG -unsigned char logname[42 ]; +unsigned char logname[LOGNAME_SIZE ];void log_message (int level,const char *format, ...) {va_list args;
@@ -187,7 +187,7 @@ } -int main (int argc,char **argv,char **envp) +int main (int argc,char *argv[],char *envp[]) {init_logging ("udevstart" );
===== udevtest.c 1.5 vs edited =====
udevtest.c +10 -31
97 lines not on this page · raw message
Greg KH
AppliedQuoted 4 lines · Kay Sievers
Here I try to make the style a bit more consistant in the different files, so that new patches just copy the 'right' one :)
Some "magic" numbers are replaced and
udevtest.cis catched up with udev.
Applied, thanks.
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel