Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 387044 Details for
Bug 515836
sys-apps/net-tools: hostname -s gives 'hostname: Unknown host' when the FQDN does not resolve
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated patch for net-tools-1.60_p20141019041918
1003_net-tools-1.60-hostname-s-fix.patch (text/plain), 995 bytes, created by
Joshua Kinard
on 2014-10-20 11:30:34 UTC
(
hide
)
Description:
Updated patch for net-tools-1.60_p20141019041918
Filename:
MIME Type:
Creator:
Joshua Kinard
Created:
2014-10-20 11:30:34 UTC
Size:
995 bytes
patch
obsolete
>diff -Naurp net-tools-1.60_p20130513023548.orig/hostname.c net-tools-1.60_p20130513023548/hostname.c >--- net-tools-1.60_p20130513023548.orig/hostname.c 2013-05-12 22:35:48.000000000 -0400 >+++ net-tools-1.60_p20130513023548/hostname.c 2014-06-30 05:11:46.000000000 -0400 >@@ -220,11 +220,6 @@ static void showhname(char *hname, int c > case 'f': > printf("%s\n", hp->h_name); > break; >- case 's': >- if (p != NULL) >- *p = '\0'; >- printf("%s\n", hp->h_name); >- break; > } > } > >@@ -311,6 +306,7 @@ int main(int argc, char **argv) > char myname[MAXHOSTNAMELEN + 1] = > {0}; > char *file = NULL; >+ char *p; > > static const struct option long_options[] = > { >@@ -412,7 +408,13 @@ int main(int argc, char **argv) > if (!type) > printf("%s\n", myname); > else >- showhname(myname, type); >+ if (type == 's') { >+ if (p = strchr(myname, '.')) >+ *p = '\0'; >+ printf("%s\n", myname); >+ } >+ else >+ showhname(myname, type); > break; > case 3: > if (file) { >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 515836
:
379970
| 387044