c99 initialisers for random.c
PATCH 1/1 c99 initialisers for random.c
drivers/char/random.c +56 -21
@@ -1850,27 +1850,62 @@ static int uuid_strategy(ctl_table *tabl }ctl_table random_table[] = { - {RANDOM_POOLSIZE ,"poolsize" , - &sysctl_poolsize,sizeof (int ),0644 ,NULL , - &proc_do_poolsize, &poolsize_strategy}, - {RANDOM_ENTROPY_COUNT ,"entropy_avail" , -NULL ,sizeof (int ),0444 ,NULL , - &proc_dointvec}, - {RANDOM_READ_THRESH ,"read_wakeup_threshold" , - &random_read_wakeup_thresh,sizeof (int ),0644 ,NULL , - &proc_dointvec_minmax, &sysctl_intvec,0 , - &min_read_thresh, &max_read_thresh}, - {RANDOM_WRITE_THRESH ,"write_wakeup_threshold" , - &random_write_wakeup_thresh,sizeof (int ),0644 ,NULL , - &proc_dointvec_minmax, &sysctl_intvec,0 , - &min_write_thresh, &max_write_thresh}, - {RANDOM_BOOT_ID ,"boot_id" , - &sysctl_bootid,16 ,0444 ,NULL , - &proc_do_uuid, &uuid_strategy}, - {RANDOM_UUID ,"uuid" , -NULL ,16 ,0444 ,NULL , - &proc_do_uuid, &uuid_strategy}, - {0 } + { + .ctl_name =RANDOM_POOLSIZE , + .procname ="poolsize" , + .data = &sysctl_poolsize, + .maxlen =sizeof (int ), + .mode =0644 , + .proc_handler = &proc_do_poolsize, + .strategy = &poolsize_strategy, + }, + { + .ctl_name =RANDOM_ENTROPY_COUNT , + .procname ="entropy_avail" , + .maxlen =sizeof (int ), + .mode =0444 , + .proc_handler = &proc_dointvec, + }, + { + .ctl_name =RANDOM_READ_THRESH , + .procname ="read_wakeup_threshold" , + .data = &random_read_wakeup_thresh, + .maxlen =sizeof (int ), + .mode =0644 , + .proc_handler = &proc_dointvec_minmax, + .strategy = &sysctl_intvec, + .extra1 = &min_read_thresh, + .extra2 = &max_read_thresh, + }, + { + .ctl_name =RANDOM_WRITE_THRESH , + .procname ="write_wakeup_threshold" , + .data = &random_write_wakeup_thresh, + .maxlen =sizeof (int ), + .mode =0644 , + .proc_handler = &proc_dointvec_minmax, + .strategy = &sysctl_intvec, + .extra1 = &min_write_thresh, + .extra2 = &max_write_thresh, + }, + { + .ctl_name =RANDOM_BOOT_ID , + .procname ="boot_id" , + .data = &sysctl_bootid, + .maxlen =16 , + .mode =0444 , + .proc_handler = &proc_do_uuid, + .strategy = &uuid_strategy, + }, + { + .ctl_name =RANDOM_UUID , + .procname ="uuid" , + .maxlen =16 , + .mode =0444 , + .proc_handler = &proc_do_uuid, + .strategy = &uuid_strategy, + }, + { .ctl_name =0 } };static void sysctl_init_random (struct entropy_store *random_state)
drivers/char/random.c
Quoted 3 lines · On Mon, Aug 11, 2003 at 02:40:24PM +0100, [email protected] wrote:
diff -urpN --exclude-from=/home/davej/.exclude
bk-linus/drivers/char/random.clinux-2.5/drivers/char/random.cdrivers/char/random.c +0
-0
Wow. That is so much more clean (to my eyes).
Jeff