]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLevel2CommandsLib/Vol.c
ShellPkg: Update ping/ifconfig library source code to consume Ip4Config2 protocol.
[mirror_edk2.git] / ShellPkg / Library / UefiShellLevel2CommandsLib / Vol.c
index 0bf0dd0ad5c924be36304b69aaff7f01cc79039c..a6f0296d760363a511f4d35261ed2c9a9c9e81ac 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Main file for vol shell level 2 function.\r
 \r
-  Copyright (c) 2015, Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
+  Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -120,7 +120,10 @@ HandleVol(
       } \r
     }\r
     if (SysInfo != NULL) {\r
-      StrnCpy ((CHAR16 *) SysInfo->VolumeLabel, Name, (Size1 > Size2?Size1/sizeof(CHAR16):Size2/sizeof(CHAR16))-1);\r
+      StrCpyS ( (CHAR16 *) SysInfo->VolumeLabel, \r
+                  (Size1>Size2? Size1/sizeof(CHAR16) : Size2/sizeof(CHAR16)), \r
+                  Name\r
+                  );\r
       SysInfo->Size = SIZE_OF_EFI_FILE_SYSTEM_INFO + Size1;\r
       Status = EfiFpHandle->SetInfo(\r
         EfiFpHandle,\r