Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48363
b: refs/heads/master
c: 8d8cb8a
h: refs/heads/master
i:
  48361: db07c27
  48359: 205bef9
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Feb 14, 2007
1 parent 931a5c2 commit a53ccd6
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7ed744d1e8faed90aa027c08eeed21c4120e623d
refs/heads/master: 8d8cb8a1bbd92a77208bdeaa25c3f17f5da9297d
145 changes: 116 additions & 29 deletions trunk/arch/mips/lasat/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,42 +302,129 @@ extern int lasat_boot_to_service;
#ifdef CONFIG_SYSCTL

static ctl_table lasat_table[] = {
{LASAT_CPU_HZ, "cpu-hz", &lasat_board_info.li_cpu_hz, sizeof(int),
0444, NULL, &proc_dointvec, &sysctl_intvec},
{LASAT_BUS_HZ, "bus-hz", &lasat_board_info.li_bus_hz, sizeof(int),
0444, NULL, &proc_dointvec, &sysctl_intvec},
{LASAT_MODEL, "bmid", &lasat_board_info.li_bmid, sizeof(int),
0444, NULL, &proc_dointvec, &sysctl_intvec},
{LASAT_PRID, "prid", &lasat_board_info.li_prid, sizeof(int),
0644, NULL, &proc_lasat_eeprom_value, &sysctl_lasat_eeprom_value},
{
.ctl_name = CTL_UNNUMBERED,
.procname = "cpu-hz",
.data = &lasat_board_info.li_cpu_hz,
.maxlen = sizeof(int),
.mode = 0444,
.proc_handler = &proc_dointvec,
.strategy = &sysctl_intvec
},
{
.ctl_name = CTL_UNNUMBERED,
.procname = "bus-hz",
.data = &lasat_board_info.li_bus_hz,
.maxlen = sizeof(int),
.mode = 0444,
.proc_handler = &proc_dointvec,
.strategy = &sysctl_intvec
},
{
.ctl_name = CTL_UNNUMBERED,
.procname = "bmid",
.data = &lasat_board_info.li_bmid,
.maxlen = sizeof(int),
.mode = 0444,
.proc_handler = &proc_dointvec,
.strategy = &sysctl_intvec
},
{
.ctl_name = CTL_UNNUMBERED,
.procname = "prid",
.data = &lasat_board_info.li_prid,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_lasat_eeprom_value,
.strategy = &sysctl_lasat_eeprom_value
},
#ifdef CONFIG_INET
{LASAT_IPADDR, "ipaddr", &lasat_board_info.li_eeprom_info.ipaddr, sizeof(int),
0644, NULL, &proc_lasat_ip, &sysctl_lasat_intvec},
{LASAT_NETMASK, "netmask", &lasat_board_info.li_eeprom_info.netmask, sizeof(int),
0644, NULL, &proc_lasat_ip, &sysctl_lasat_intvec},
{LASAT_BCAST, "bcastaddr", &lasat_bcastaddr,
sizeof(lasat_bcastaddr), 0600, NULL,
&proc_dostring, &sysctl_string},
{
.ctl_name = CTL_UNNUMBERED,
.procname = "ipaddr",
.data = &lasat_board_info.li_eeprom_info.ipaddr,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_lasat_ip,
.strategy = &sysctl_lasat_intvec
},
{
.ctl_name = LASAT_NETMASK,
.procname = "netmask",
.data = &lasat_board_info.li_eeprom_info.netmask,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_lasat_ip,
.strategy = &sysctl_lasat_intvec
},
{
.ctl_name = CTL_UNNUMBERED,
.procname = "bcastaddr",
.data = &lasat_bcastaddr,
.maxlen = sizeof(lasat_bcastaddr),
.mode = 0600,
.proc_handler = &proc_dostring,
.strategy = &sysctl_string
},
#endif
{LASAT_PASSWORD, "passwd_hash", &lasat_board_info.li_eeprom_info.passwd_hash, sizeof(lasat_board_info.li_eeprom_info.passwd_hash),
0600, NULL, &proc_dolasatstring, &sysctl_lasatstring},
{LASAT_SBOOT, "boot-service", &lasat_boot_to_service, sizeof(int),
0644, NULL, &proc_dointvec, &sysctl_intvec},
{
.ctl_name = CTL_UNNUMBERED,
.procname = "passwd_hash",
.data = &lasat_board_info.li_eeprom_info.passwd_hash,
.maxlen = sizeof(lasat_board_info.li_eeprom_info.passwd_hash),
.mode = 0600,
.proc_handler = &proc_dolasatstring,
.strategy = &sysctl_lasatstring
},
{
.ctl_name = CTL_UNNUMBERED,
.procname = "boot-service",
.data = &lasat_boot_to_service,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec,
.strategy = &sysctl_intvec
},
#ifdef CONFIG_DS1603
{LASAT_RTC, "rtc", &rtctmp, sizeof(int),
0644, NULL, &proc_dolasatrtc, &sysctl_lasat_rtc},
{
.ctl_name = CTL_UNNUMBERED,
.procname = "rtc",
.data = &rtctmp,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dolasatrtc,
.strategy = &sysctl_lasat_rtc
},
#endif
{LASAT_NAMESTR, "namestr", &lasat_board_info.li_namestr, sizeof(lasat_board_info.li_namestr),
0444, NULL, &proc_dostring, &sysctl_string},
{LASAT_TYPESTR, "typestr", &lasat_board_info.li_typestr, sizeof(lasat_board_info.li_typestr),
0444, NULL, &proc_dostring, &sysctl_string},
{0}
{
.ctl_name = CTL_UNNUMBERED,
.procname = "namestr",
.data = &lasat_board_info.li_namestr,
.maxlen = sizeof(lasat_board_info.li_namestr),
.mode = 0444,
.proc_handler = &proc_dostring,
.strategy = &sysctl_string
},
{
.ctl_name = CTL_UNNUMBERED,
.procname = "typestr",
.data = &lasat_board_info.li_typestr,
.maxlen = sizeof(lasat_board_info.li_typestr),
.mode = 0444,
.proc_handler = &proc_dostring,
.strategy = &sysctl_string
},
{}
};

#define CTL_LASAT 1 // CTL_ANY ???
static ctl_table lasat_root_table[] = {
{ CTL_LASAT, "lasat", NULL, 0, 0555, lasat_table },
{ 0 }
{
.ctl_name = CTL_UNNUMBERED,
.procname = "lasat",
.mode = 0555,
.child = lasat_table
},
{}
};

static int __init lasat_register_sysctl(void)
Expand Down

0 comments on commit a53ccd6

Please sign in to comment.