]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blobdiff - net-tools/patches/net-tools-1.60-hostname-short.patch
net-tools: Update to 2.0 git-rev e5f1be13.
[people/amarx/ipfire-3.x.git] / net-tools / patches / net-tools-1.60-hostname-short.patch
diff --git a/net-tools/patches/net-tools-1.60-hostname-short.patch b/net-tools/patches/net-tools-1.60-hostname-short.patch
deleted file mode 100644 (file)
index d9772e6..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -up net-tools-1.60/hostname.c.hostname-short net-tools-1.60/hostname.c
---- net-tools-1.60/hostname.c.hostname-short   2009-09-30 17:44:21.000000000 +0200
-+++ net-tools-1.60/hostname.c  2009-09-08 11:55:03.000000000 +0200
-@@ -176,11 +176,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;
-     default:
-     ;
-     }
-@@ -270,6 +265,7 @@ int main(int argc, char **argv)
-     char myname[MAXHOSTNAMELEN + 1] =
-     {0};
-     char *file = NULL;
-+    char *p;
-     static const struct option long_options[] =
-     {
-@@ -370,7 +366,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) {