diff options
author | Serge E. Hallyn <serue@us.ibm.com> | 2006-10-02 05:18:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 10:57:21 -0400 |
commit | 96b644bdec977b97a45133e5b4466ba47a7a5e65 (patch) | |
tree | 4c6d1f0d54746aa06132628379b2a0efec5e1701 /drivers | |
parent | e9ff3990f08e9a0c2839cc22808b01732ea5b3e4 (diff) |
[PATCH] namespaces: utsname: use init_utsname when appropriate
In some places, particularly drivers and __init code, the init utsns is the
appropriate one to use. This patch replaces those with a the init_utsname
helper.
Changes: Removed several uses of init_utsname(). Hope I picked all the
right ones in net/ipv4/ipconfig.c. These are now changed to
utsname() (the per-process namespace utsname) in the previous
patch (2/7)
[akpm@osdl.org: CIFS fix]
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Andrey Savochkin <saw@sw.ru>
Cc: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_verbs.c | 2 | ||||
-rw-r--r-- | drivers/parisc/led.c | 2 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_ct.c | 8 | ||||
-rw-r--r-- | drivers/usb/core/hcd.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/ether.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/gmidi.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/serial.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/zero.c | 2 |
9 files changed, 13 insertions, 13 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index 42eaed88c281..a5456108dbad 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c | |||
@@ -1601,7 +1601,7 @@ int ipath_register_ib_device(struct ipath_devdata *dd) | |||
1601 | dev->mmap = ipath_mmap; | 1601 | dev->mmap = ipath_mmap; |
1602 | 1602 | ||
1603 | snprintf(dev->node_desc, sizeof(dev->node_desc), | 1603 | snprintf(dev->node_desc, sizeof(dev->node_desc), |
1604 | IPATH_IDSTR " %s", system_utsname.nodename); | 1604 | IPATH_IDSTR " %s", init_utsname()->nodename); |
1605 | 1605 | ||
1606 | ret = ib_register_device(dev); | 1606 | ret = ib_register_device(dev); |
1607 | if (ret) | 1607 | if (ret) |
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index bf00fa2537bb..8dac2ba82bb9 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c | |||
@@ -684,7 +684,7 @@ int __init led_init(void) | |||
684 | int ret; | 684 | int ret; |
685 | 685 | ||
686 | snprintf(lcd_text_default, sizeof(lcd_text_default), | 686 | snprintf(lcd_text_default, sizeof(lcd_text_default), |
687 | "Linux %s", system_utsname.release); | 687 | "Linux %s", init_utsname()->release); |
688 | 688 | ||
689 | /* Work around the buggy PDC of KittyHawk-machines */ | 689 | /* Work around the buggy PDC of KittyHawk-machines */ |
690 | switch (CPU_HVERSION) { | 690 | switch (CPU_HVERSION) { |
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c index ae4106458991..1b53afb1cb57 100644 --- a/drivers/scsi/lpfc/lpfc_ct.c +++ b/drivers/scsi/lpfc/lpfc_ct.c | |||
@@ -933,8 +933,8 @@ lpfc_fdmi_cmd(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, int cmdcode) | |||
933 | ae = (ATTRIBUTE_ENTRY *) ((uint8_t *) rh + size); | 933 | ae = (ATTRIBUTE_ENTRY *) ((uint8_t *) rh + size); |
934 | ae->ad.bits.AttrType = be16_to_cpu(OS_NAME_VERSION); | 934 | ae->ad.bits.AttrType = be16_to_cpu(OS_NAME_VERSION); |
935 | sprintf(ae->un.OsNameVersion, "%s %s %s", | 935 | sprintf(ae->un.OsNameVersion, "%s %s %s", |
936 | system_utsname.sysname, system_utsname.release, | 936 | init_utsname()->sysname, init_utsname()->release, |
937 | system_utsname.version); | 937 | init_utsname()->version); |
938 | len = strlen(ae->un.OsNameVersion); | 938 | len = strlen(ae->un.OsNameVersion); |
939 | len += (len & 3) ? (4 - (len & 3)) : 4; | 939 | len += (len & 3) ? (4 - (len & 3)) : 4; |
940 | ae->ad.bits.AttrLen = be16_to_cpu(FOURBYTES + len); | 940 | ae->ad.bits.AttrLen = be16_to_cpu(FOURBYTES + len); |
@@ -1052,7 +1052,7 @@ lpfc_fdmi_cmd(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, int cmdcode) | |||
1052 | size); | 1052 | size); |
1053 | ae->ad.bits.AttrType = be16_to_cpu(HOST_NAME); | 1053 | ae->ad.bits.AttrType = be16_to_cpu(HOST_NAME); |
1054 | sprintf(ae->un.HostName, "%s", | 1054 | sprintf(ae->un.HostName, "%s", |
1055 | system_utsname.nodename); | 1055 | init_utsname()->nodename); |
1056 | len = strlen(ae->un.HostName); | 1056 | len = strlen(ae->un.HostName); |
1057 | len += (len & 3) ? (4 - (len & 3)) : 4; | 1057 | len += (len & 3) ? (4 - (len & 3)) : 4; |
1058 | ae->ad.bits.AttrLen = | 1058 | ae->ad.bits.AttrLen = |
@@ -1140,7 +1140,7 @@ lpfc_fdmi_tmo_handler(struct lpfc_hba *phba) | |||
1140 | 1140 | ||
1141 | ndlp = lpfc_findnode_did(phba, NLP_SEARCH_ALL, FDMI_DID); | 1141 | ndlp = lpfc_findnode_did(phba, NLP_SEARCH_ALL, FDMI_DID); |
1142 | if (ndlp) { | 1142 | if (ndlp) { |
1143 | if (system_utsname.nodename[0] != '\0') { | 1143 | if (init_utsname()->nodename[0] != '\0') { |
1144 | lpfc_fdmi_cmd(phba, ndlp, SLI_MGMT_DHBA); | 1144 | lpfc_fdmi_cmd(phba, ndlp, SLI_MGMT_DHBA); |
1145 | } else { | 1145 | } else { |
1146 | mod_timer(&phba->fc_fdmitmo, jiffies + HZ * 60); | 1146 | mod_timer(&phba->fc_fdmitmo, jiffies + HZ * 60); |
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 37f9f5e7425d..e658089f7b50 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -318,8 +318,8 @@ static int rh_string ( | |||
318 | 318 | ||
319 | // id 3 == vendor description | 319 | // id 3 == vendor description |
320 | } else if (id == 3) { | 320 | } else if (id == 3) { |
321 | snprintf (buf, sizeof buf, "%s %s %s", system_utsname.sysname, | 321 | snprintf (buf, sizeof buf, "%s %s %s", init_utsname()->sysname, |
322 | system_utsname.release, hcd->driver->description); | 322 | init_utsname()->release, hcd->driver->description); |
323 | 323 | ||
324 | // unsupported IDs --> "protocol stall" | 324 | // unsupported IDs --> "protocol stall" |
325 | } else | 325 | } else |
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 366dc0a9e52c..1c17d26d03b8 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c | |||
@@ -2260,7 +2260,7 @@ eth_bind (struct usb_gadget *gadget) | |||
2260 | return -ENODEV; | 2260 | return -ENODEV; |
2261 | } | 2261 | } |
2262 | snprintf (manufacturer, sizeof manufacturer, "%s %s/%s", | 2262 | snprintf (manufacturer, sizeof manufacturer, "%s %s/%s", |
2263 | system_utsname.sysname, system_utsname.release, | 2263 | init_utsname()->sysname, init_utsname()->release, |
2264 | gadget->name); | 2264 | gadget->name); |
2265 | 2265 | ||
2266 | /* If there's an RNDIS configuration, that's what Windows wants to | 2266 | /* If there's an RNDIS configuration, that's what Windows wants to |
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index c83d3b6c68f2..8b975d15538d 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c | |||
@@ -4001,7 +4001,7 @@ static int __init fsg_bind(struct usb_gadget *gadget) | |||
4001 | usb_gadget_set_selfpowered(gadget); | 4001 | usb_gadget_set_selfpowered(gadget); |
4002 | 4002 | ||
4003 | snprintf(manufacturer, sizeof manufacturer, "%s %s with %s", | 4003 | snprintf(manufacturer, sizeof manufacturer, "%s %s with %s", |
4004 | system_utsname.sysname, system_utsname.release, | 4004 | init_utsname()->sysname, init_utsname()->release, |
4005 | gadget->name); | 4005 | gadget->name); |
4006 | 4006 | ||
4007 | /* On a real device, serial[] would be loaded from permanent | 4007 | /* On a real device, serial[] would be loaded from permanent |
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c index b68cecd57411..83601d4009e3 100644 --- a/drivers/usb/gadget/gmidi.c +++ b/drivers/usb/gadget/gmidi.c | |||
@@ -1189,7 +1189,7 @@ static int __devinit gmidi_bind(struct usb_gadget *gadget) | |||
1189 | strlcpy(manufacturer, iManufacturer, sizeof(manufacturer)); | 1189 | strlcpy(manufacturer, iManufacturer, sizeof(manufacturer)); |
1190 | } else { | 1190 | } else { |
1191 | snprintf(manufacturer, sizeof(manufacturer), "%s %s with %s", | 1191 | snprintf(manufacturer, sizeof(manufacturer), "%s %s with %s", |
1192 | system_utsname.sysname, system_utsname.release, | 1192 | init_utsname()->sysname, init_utsname()->release, |
1193 | gadget->name); | 1193 | gadget->name); |
1194 | } | 1194 | } |
1195 | if (iProduct) { | 1195 | if (iProduct) { |
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index 489a85e58bca..208e55a667ac 100644 --- a/drivers/usb/gadget/serial.c +++ b/drivers/usb/gadget/serial.c | |||
@@ -1434,7 +1434,7 @@ static int __init gs_bind(struct usb_gadget *gadget) | |||
1434 | return -ENOMEM; | 1434 | return -ENOMEM; |
1435 | 1435 | ||
1436 | snprintf(manufacturer, sizeof(manufacturer), "%s %s with %s", | 1436 | snprintf(manufacturer, sizeof(manufacturer), "%s %s with %s", |
1437 | system_utsname.sysname, system_utsname.release, | 1437 | init_utsname()->sysname, init_utsname()->release, |
1438 | gadget->name); | 1438 | gadget->name); |
1439 | 1439 | ||
1440 | memset(dev, 0, sizeof(struct gs_dev)); | 1440 | memset(dev, 0, sizeof(struct gs_dev)); |
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index b7018ee487ea..0f809dd68492 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c | |||
@@ -1242,7 +1242,7 @@ autoconf_fail: | |||
1242 | EP_OUT_NAME, EP_IN_NAME); | 1242 | EP_OUT_NAME, EP_IN_NAME); |
1243 | 1243 | ||
1244 | snprintf (manufacturer, sizeof manufacturer, "%s %s with %s", | 1244 | snprintf (manufacturer, sizeof manufacturer, "%s %s with %s", |
1245 | system_utsname.sysname, system_utsname.release, | 1245 | init_utsname()->sysname, init_utsname()->release, |
1246 | gadget->name); | 1246 | gadget->name); |
1247 | 1247 | ||
1248 | return 0; | 1248 | return 0; |