]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/BsdSocketLib/gethostname.c
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / StdLib / BsdSocketLib / gethostname.c
diff --git a/StdLib/BsdSocketLib/gethostname.c b/StdLib/BsdSocketLib/gethostname.c
deleted file mode 100644 (file)
index 1b0742a..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*\r
- * Copyright (c) 1999, 2000\r
- * Intel Corporation.\r
- * All rights reserved.\r
- * \r
- * Redistribution and use in source and binary forms, with or without modification,\r
- * are permitted provided that the following conditions are met:\r
- * \r
- * 1. Redistributions of source code must retain the above copyright notice,\r
- *    this list of conditions and the following disclaimer.\r
- * \r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- *    this list of conditions and the following disclaimer in the documentation\r
- *    and/or other materials provided with the distribution.\r
- * \r
- * 3. All advertising materials mentioning features or use of this software must\r
- *    display the following acknowledgement:\r
- * \r
- *    This product includes software developed by Intel Corporation and its\r
- *    contributors.\r
- * \r
- * 4. Neither the name of Intel Corporation or its contributors may be used to\r
- *    endorse or promote products derived from this software without specific\r
- *    prior written permission.\r
- * \r
- * THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION AND CONTRIBUTORS ``AS IS'' AND\r
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r
- * DISCLAIMED.  IN NO EVENT SHALL INTEL CORPORATION OR CONTRIBUTORS BE LIABLE FOR\r
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\r
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- * \r
- */\r
-\r
-#include <stdlib.h>\r
-#include <string.h>\r
-#include <unistd.h>\r
-\r
-/*++\r
-\r
-Module Name:\r
-\r
-    gethostname.c\r
-    \r
-Abstract:\r
-\r
-    Map FreeBSD gethostname call to EFI Interface\r
-\r
-\r
-Revision History\r
-\r
---*/\r
-\r
-int\r
-gethostname(\r
-       char    *name,\r
-       size_t          namelen\r
-       )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-    Get the hostname for this system.\r
-\r
-Arguments:\r
-    \r
-       name            - Pointer to storage for hostname.\r
-       namelen         - Length of name\r
-\r
-Returns:\r
-\r
-       0 on success, -1 if not set\r
-\r
---*/\r
-{\r
-       char    *pHost;\r
-\r
-       pHost = getenv ("HOSTNAME");\r
-\r
-       if ( pHost == NULL ) {\r
-               *name = 0;\r
-       } else {\r
-               strncpy (name, pHost, namelen);\r
-               name[namelen-1] = 0;\r
-       }\r
-\r
-       return (0);\r
-}\r