[Linux1394-cvslog] rev 566 - / branches/rawiso branches/gasp
Brought to you by:
aeb,
bencollins
From: SVN U. <ben...@li...> - 2002-08-28 12:07:30
|
Author: bencollins Date: 2002-08-28 16:59:39 -0400 (Wed, 28 Aug 2002) New Revision: 566 Removed: branch-points/ Modified: branches/gasp/nodemgr.c branches/rawiso/ Log: We aren't using a branch-point directory anymore. We're using a "branch-point" property set on the branched directory. Like so: # svn copy trunk branches/mybranch (note rev copied from) # svn propset branch-point <rev> branches/mybranch # svn commit -m "Created 'mybranch'" Then you can query the branch-point using propget. Modified: branches/gasp/nodemgr.c ============================================================================== --- branches/gasp/nodemgr.c (original) +++ branches/gasp/nodemgr.c 2002-08-28 16:59:41.000000000 -0400 @@ -79,7 +79,7 @@ #define PUTF(fmt, args...) out += sprintf(out, fmt, ## args) -static int raw1394_read_proc(char *page, char **start, off_t off, +static int hpsb_devices_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data) { struct list_head *lh; @@ -178,7 +178,32 @@ return len; } +static int hpsb_devices_read_proc(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + struct list_head *lh; + struct node_entry *ne; + int len; + char *out = page; + + PUTF("Not implemented yet\n"); + + len = out - page; + len -= off; + if (len < count) { + *eof = 1; + if (len <= 0) + return 0; + } else + len = count; + + *start = page + off; + + return len; +} + #undef PUTF + #endif /* CONFIG_PROC_FS */ static void nodemgr_process_config_rom(struct node_entry *ne, @@ -1424,14 +1449,15 @@ static struct hpsb_highlevel *hl; -#define PROC_ENTRY "devices" - void init_ieee1394_nodemgr(int disable_hotplug) { nodemgr_disable_hotplug = disable_hotplug; #ifdef CONFIG_PROC_FS - if (!create_proc_read_entry(PROC_ENTRY, 0444, ieee1394_procfs_entry, raw1394_read_proc, NULL)) - HPSB_ERR("Can't create devices procfs entry"); + if (!create_proc_read_entry("devices", 0444, ieee1394_procfs_entry, + hpsb_devices_read_proc, NULL) || + !create_proc_read_entry("channels", 0444, ieee1394_procfs_entry, + hpsb_channels_read_proc, NULL)) + HPSB_ERR("Can't create procfs entries"); #endif hl = hpsb_register_highlevel("Node manager", &nodemgr_ops); if (!hl) { @@ -1443,6 +1469,7 @@ { hpsb_unregister_highlevel(hl); #ifdef CONFIG_PROC_FS - remove_proc_entry(PROC_ENTRY, ieee1394_procfs_entry); + remove_proc_entry("devices", ieee1394_procfs_entry); + remove_proc_entry("channels", ieee1394_procfs_entry); #endif } |