Thread: [Linux1394-cvslog] rev 856 - trunk
Brought to you by:
aeb,
bencollins
From: SVN U. <ben...@li...> - 2003-04-10 02:15:06
|
Author: bencollins Date: 2003-04-09 22:14:25 -0400 (Wed, 09 Apr 2003) New Revision: 856 Modified: trunk/nodemgr.c Log: Typo: s/__ne/ne/ Modified: trunk/nodemgr.c ============================================================================== --- trunk/nodemgr.c (original) +++ trunk/nodemgr.c 2003-04-09 22:14:26.000000000 -0400 @@ -31,16 +31,6 @@ #include "nodemgr.h" -#if BUS_ID_SIZE >= 20 -#define FW_BUS_ID_FMT "%016Lx" -#define FW_BUS_ID_ARGS(__hi, __ne) (unsigned long long)(__ne->guid) -#elif 1 -#define FW_BUS_ID_FMT "%012Lx" -#define FW_BUS_ID_ARGS(__hi, __ne) (unsigned long long)__ne->guid & 0xffffffffffffLL -#else -#define FW_BUS_ID_FMT "%d-" NODE_BUS_FMT -#define FW_BUS_ID_ARGS(__hi, __ne) __hi->id, NODE_BUS_ARGS(__ne->nodeid) -#endif static char *nodemgr_find_oui_name(int oui) { @@ -457,8 +447,9 @@ struct unit_directory *ud; ud = container_of(list_to_dev(lh), struct unit_directory, device); - sprintf(ud->device.name, "IEEE-1394 unit directory %d-" NODE_BUS_FMT "-%u", - hi->id, NODE_BUS_ARGS(ne->nodeid), ud->id); + snprintf(ud->device.name, DEVICE_NAME_SIZE, + "IEEE-1394 unit directory %d-" NODE_BUS_FMT "-%u", + hi->id, NODE_BUS_ARGS(ne->nodeid), ud->id); } } @@ -701,10 +692,11 @@ memcpy(&ne->device, &nodemgr_dev_template_ne, sizeof(ne->device)); ne->device.parent = &host->device; - snprintf(ne->device.bus_id, BUS_ID_SIZE, FW_BUS_ID_FMT, - FW_BUS_ID_ARGS(hi, ne)); - sprintf(ne->device.name, "IEEE-1394 device %d-" NODE_BUS_FMT, - hi->id, NODE_BUS_ARGS(ne->nodeid)); + snprintf(ne->device.bus_id, BUS_ID_SIZE, "%016Lx", + (unsigned long long)(ne->guid)); + snprintf(ne->device.name, DEVICE_NAME_SIZE, + "IEEE-1394 device %d-" NODE_BUS_FMT, hi->id, + NODE_BUS_ARGS(ne->nodeid)); device_register(&ne->device); @@ -1296,8 +1288,9 @@ int update_ud_names = 0; if (ne->nodeid != nodeid) { - sprintf(ne->device.name, "IEEE-1394 device %d-" NODE_BUS_FMT, - hi->id, NODE_BUS_ARGS(ne->nodeid)); + snprintf(ne->device.name, DEVICE_NAME_SIZE, + "IEEE-1394 device %d-" NODE_BUS_FMT, + hi->id, NODE_BUS_ARGS(ne->nodeid)); HPSB_DEBUG("Node " NODE_BUS_FMT " changed to " NODE_BUS_FMT, NODE_BUS_ARGS(ne->nodeid), NODE_BUS_ARGS(nodeid)); ne->nodeid = nodeid; @@ -1736,8 +1729,9 @@ memcpy(&host->device, &nodemgr_dev_template_host, sizeof(host->device)); host->device.parent = &host->pdev->dev; - sprintf(host->device.bus_id, "fw-host%d", hi->id); - sprintf(host->device.name, "IEEE-1394 Host %s-%d", host->driver->name, hi->id); + snprintf(host->device.bus_id, BUS_ID_SIZE, "fw-host%d", hi->id); + snprintf(host->device.name, DEVICE_NAME_SIZE, "IEEE-1394 Host %s-%d", + host->driver->name, hi->id); sprintf(hi->daemon_name, "knodemgrd_%d", hi->id); |