Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d161a13f authored by Al Viro's avatar Al Viro
Browse files

switch procfs to umode_t use



both proc_dir_entry ->mode and populating functions

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 587a1f16
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -783,7 +783,7 @@ static const struct file_operations lparcfg_fops = {
static int __init lparcfg_init(void)
{
	struct proc_dir_entry *ent;
	mode_t mode = S_IRUSR | S_IRGRP | S_IROTH;
	umode_t mode = S_IRUSR | S_IRGRP | S_IROTH;

	/* Allow writing if we have FW_FEATURE_SPLPAR */
	if (firmware_has_feature(FW_FEATURE_SPLPAR) &&
+1 −1
Original line number Diff line number Diff line
@@ -873,7 +873,7 @@ DECLARE_FILE_FUNCTIONS(alarm);

static const struct battery_file {
	struct file_operations ops;
	mode_t mode;
	umode_t mode;
	const char *name;
} acpi_battery_file[] = {
	FILE_DESCRIPTION_RO(info),
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@
/* Structure used to define /proc entries */
typedef struct _i2o_proc_entry_t {
	char *name;		/* entry name */
	mode_t mode;		/* mode */
	umode_t mode;		/* mode */
	const struct file_operations *fops;	/* open function */
} i2o_proc_entry;

+1 −1
Original line number Diff line number Diff line
@@ -324,7 +324,7 @@ static const struct file_operations gru_fops = {

static struct proc_entry {
	char *name;
	int mode;
	umode_t mode;
	const struct file_operations *fops;
	struct proc_dir_entry *entry;
} proc_files[] = {
+2 −2
Original line number Diff line number Diff line
@@ -1053,7 +1053,7 @@ static const struct file_operations disp_proc_fops = {
};

static int
asus_proc_add(char *name, const struct file_operations *proc_fops, mode_t mode,
asus_proc_add(char *name, const struct file_operations *proc_fops, umode_t mode,
		     struct acpi_device *device)
{
	struct proc_dir_entry *proc;
@@ -1072,7 +1072,7 @@ asus_proc_add(char *name, const struct file_operations *proc_fops, mode_t mode,
static int asus_hotk_add_fs(struct acpi_device *device)
{
	struct proc_dir_entry *proc;
	mode_t mode;
	umode_t mode;

	if ((asus_uid == 0) && (asus_gid == 0)) {
		mode = S_IFREG | S_IRUGO | S_IWUSR | S_IWGRP;
Loading