Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

switch procfs to umode_t use

both proc_dir_entry ->mode and populating functions

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro d161a13f 587a1f16

+31 -32
+1 -1
arch/powerpc/kernel/lparcfg.c
··· 783 783 static int __init lparcfg_init(void) 784 784 { 785 785 struct proc_dir_entry *ent; 786 - mode_t mode = S_IRUSR | S_IRGRP | S_IROTH; 786 + umode_t mode = S_IRUSR | S_IRGRP | S_IROTH; 787 787 788 788 /* Allow writing if we have FW_FEATURE_SPLPAR */ 789 789 if (firmware_has_feature(FW_FEATURE_SPLPAR) &&
+1 -1
drivers/acpi/battery.c
··· 873 873 874 874 static const struct battery_file { 875 875 struct file_operations ops; 876 - mode_t mode; 876 + umode_t mode; 877 877 const char *name; 878 878 } acpi_battery_file[] = { 879 879 FILE_DESCRIPTION_RO(info),
+1 -1
drivers/message/i2o/i2o_proc.c
··· 56 56 /* Structure used to define /proc entries */ 57 57 typedef struct _i2o_proc_entry_t { 58 58 char *name; /* entry name */ 59 - mode_t mode; /* mode */ 59 + umode_t mode; /* mode */ 60 60 const struct file_operations *fops; /* open function */ 61 61 } i2o_proc_entry; 62 62
+1 -1
drivers/misc/sgi-gru/gruprocfs.c
··· 324 324 325 325 static struct proc_entry { 326 326 char *name; 327 - int mode; 327 + umode_t mode; 328 328 const struct file_operations *fops; 329 329 struct proc_dir_entry *entry; 330 330 } proc_files[] = {
+2 -2
drivers/platform/x86/asus_acpi.c
··· 1053 1053 }; 1054 1054 1055 1055 static int 1056 - asus_proc_add(char *name, const struct file_operations *proc_fops, mode_t mode, 1056 + asus_proc_add(char *name, const struct file_operations *proc_fops, umode_t mode, 1057 1057 struct acpi_device *device) 1058 1058 { 1059 1059 struct proc_dir_entry *proc; ··· 1072 1072 static int asus_hotk_add_fs(struct acpi_device *device) 1073 1073 { 1074 1074 struct proc_dir_entry *proc; 1075 - mode_t mode; 1075 + umode_t mode; 1076 1076 1077 1077 if ((asus_uid == 0) && (asus_gid == 0)) { 1078 1078 mode = S_IFREG | S_IRUGO | S_IWUSR | S_IWGRP;
+2 -2
drivers/platform/x86/thinkpad_acpi.c
··· 297 297 char param[32]; 298 298 299 299 int (*init) (struct ibm_init_struct *); 300 - mode_t base_procfs_mode; 300 + umode_t base_procfs_mode; 301 301 struct ibm_struct *data; 302 302 }; 303 303 ··· 8542 8542 "%s installed\n", ibm->name); 8543 8543 8544 8544 if (ibm->read) { 8545 - mode_t mode = iibm->base_procfs_mode; 8545 + umode_t mode = iibm->base_procfs_mode; 8546 8546 8547 8547 if (!mode) 8548 8548 mode = S_IRUGO;
+3 -4
drivers/scsi/sg.c
··· 2325 2325 static int 2326 2326 sg_proc_init(void) 2327 2327 { 2328 - int k, mask; 2329 2328 int num_leaves = ARRAY_SIZE(sg_proc_leaf_arr); 2330 - struct sg_proc_leaf * leaf; 2329 + int k; 2331 2330 2332 2331 sg_proc_sgp = proc_mkdir(sg_proc_sg_dirname, NULL); 2333 2332 if (!sg_proc_sgp) 2334 2333 return 1; 2335 2334 for (k = 0; k < num_leaves; ++k) { 2336 - leaf = &sg_proc_leaf_arr[k]; 2337 - mask = leaf->fops->write ? S_IRUGO | S_IWUSR : S_IRUGO; 2335 + struct sg_proc_leaf *leaf = &sg_proc_leaf_arr[k]; 2336 + umode_t mask = leaf->fops->write ? S_IRUGO | S_IWUSR : S_IRUGO; 2338 2337 proc_create(leaf->name, mask, sg_proc_sgp, leaf->fops); 2339 2338 } 2340 2339 return 0;
+1 -1
fs/proc/base.c
··· 101 101 struct pid_entry { 102 102 char *name; 103 103 int len; 104 - mode_t mode; 104 + umode_t mode; 105 105 const struct inode_operations *iop; 106 106 const struct file_operations *fop; 107 107 union proc_op op;
+4 -4
fs/proc/generic.c
··· 597 597 598 598 static struct proc_dir_entry *__proc_create(struct proc_dir_entry **parent, 599 599 const char *name, 600 - mode_t mode, 600 + umode_t mode, 601 601 nlink_t nlink) 602 602 { 603 603 struct proc_dir_entry *ent = NULL; ··· 659 659 } 660 660 EXPORT_SYMBOL(proc_symlink); 661 661 662 - struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode, 662 + struct proc_dir_entry *proc_mkdir_mode(const char *name, umode_t mode, 663 663 struct proc_dir_entry *parent) 664 664 { 665 665 struct proc_dir_entry *ent; ··· 699 699 } 700 700 EXPORT_SYMBOL(proc_mkdir); 701 701 702 - struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, 702 + struct proc_dir_entry *create_proc_entry(const char *name, umode_t mode, 703 703 struct proc_dir_entry *parent) 704 704 { 705 705 struct proc_dir_entry *ent; ··· 728 728 } 729 729 EXPORT_SYMBOL(create_proc_entry); 730 730 731 - struct proc_dir_entry *proc_create_data(const char *name, mode_t mode, 731 + struct proc_dir_entry *proc_create_data(const char *name, umode_t mode, 732 732 struct proc_dir_entry *parent, 733 733 const struct file_operations *proc_fops, 734 734 void *data)
+1 -1
fs/proc/proc_net.c
··· 179 179 180 180 181 181 struct proc_dir_entry *proc_net_fops_create(struct net *net, 182 - const char *name, mode_t mode, const struct file_operations *fops) 182 + const char *name, umode_t mode, const struct file_operations *fops) 183 183 { 184 184 return proc_create(name, mode, net->proc_net, fops); 185 185 }
+1 -1
include/linux/ide.h
··· 920 920 921 921 typedef struct { 922 922 const char *name; 923 - mode_t mode; 923 + umode_t mode; 924 924 const struct file_operations *proc_fops; 925 925 } ide_proc_entry_t; 926 926
+12 -12
include/linux/proc_fs.h
··· 50 50 51 51 struct proc_dir_entry { 52 52 unsigned int low_ino; 53 - mode_t mode; 53 + umode_t mode; 54 54 nlink_t nlink; 55 55 uid_t uid; 56 56 gid_t gid; ··· 106 106 107 107 void proc_flush_task(struct task_struct *task); 108 108 109 - extern struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, 109 + extern struct proc_dir_entry *create_proc_entry(const char *name, umode_t mode, 110 110 struct proc_dir_entry *parent); 111 - struct proc_dir_entry *proc_create_data(const char *name, mode_t mode, 111 + struct proc_dir_entry *proc_create_data(const char *name, umode_t mode, 112 112 struct proc_dir_entry *parent, 113 113 const struct file_operations *proc_fops, 114 114 void *data); ··· 146 146 extern struct proc_dir_entry *proc_symlink(const char *, 147 147 struct proc_dir_entry *, const char *); 148 148 extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *); 149 - extern struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode, 149 + extern struct proc_dir_entry *proc_mkdir_mode(const char *name, umode_t mode, 150 150 struct proc_dir_entry *parent); 151 151 152 - static inline struct proc_dir_entry *proc_create(const char *name, mode_t mode, 152 + static inline struct proc_dir_entry *proc_create(const char *name, umode_t mode, 153 153 struct proc_dir_entry *parent, const struct file_operations *proc_fops) 154 154 { 155 155 return proc_create_data(name, mode, parent, proc_fops, NULL); 156 156 } 157 157 158 158 static inline struct proc_dir_entry *create_proc_read_entry(const char *name, 159 - mode_t mode, struct proc_dir_entry *base, 159 + umode_t mode, struct proc_dir_entry *base, 160 160 read_proc_t *read_proc, void * data) 161 161 { 162 162 struct proc_dir_entry *res=create_proc_entry(name,mode,base); ··· 168 168 } 169 169 170 170 extern struct proc_dir_entry *proc_net_fops_create(struct net *net, 171 - const char *name, mode_t mode, const struct file_operations *fops); 171 + const char *name, umode_t mode, const struct file_operations *fops); 172 172 extern void proc_net_remove(struct net *net, const char *name); 173 173 extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, 174 174 struct proc_dir_entry *parent); ··· 185 185 } 186 186 187 187 static inline struct proc_dir_entry *create_proc_entry(const char *name, 188 - mode_t mode, struct proc_dir_entry *parent) { return NULL; } 188 + umode_t mode, struct proc_dir_entry *parent) { return NULL; } 189 189 static inline struct proc_dir_entry *proc_create(const char *name, 190 - mode_t mode, struct proc_dir_entry *parent, 190 + umode_t mode, struct proc_dir_entry *parent, 191 191 const struct file_operations *proc_fops) 192 192 { 193 193 return NULL; 194 194 } 195 195 static inline struct proc_dir_entry *proc_create_data(const char *name, 196 - mode_t mode, struct proc_dir_entry *parent, 196 + umode_t mode, struct proc_dir_entry *parent, 197 197 const struct file_operations *proc_fops, void *data) 198 198 { 199 199 return NULL; ··· 205 205 static inline struct proc_dir_entry *proc_mkdir(const char *name, 206 206 struct proc_dir_entry *parent) {return NULL;} 207 207 static inline struct proc_dir_entry *proc_mkdir_mode(const char *name, 208 - mode_t mode, struct proc_dir_entry *parent) { return NULL; } 208 + umode_t mode, struct proc_dir_entry *parent) { return NULL; } 209 209 210 210 static inline struct proc_dir_entry *create_proc_read_entry(const char *name, 211 - mode_t mode, struct proc_dir_entry *base, 211 + umode_t mode, struct proc_dir_entry *base, 212 212 read_proc_t *read_proc, void * data) { return NULL; } 213 213 214 214 struct tty_driver;
+1 -1
include/sound/info.h
··· 72 72 73 73 struct snd_info_entry { 74 74 const char *name; 75 - mode_t mode; 75 + umode_t mode; 76 76 long size; 77 77 unsigned short content; 78 78 union {