/** @file
Main file for vol shell level 2 function.
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "UefiShellLevel2CommandsLib.h"
#include <Guid/FileSystemInfo.h>
#include <Guid/FileSystemVolumeLabelInfo.h>
/**
Print the info or change the volume info.
@param[in] Path String with starting path.
@param[in] Delete TRUE to delete the volume label. FALSE otherwise.
@param[in] Name New name to set to the volume label.
@retval SHELL_SUCCESS The operation was sucessful.
**/
)
{
if (
){
return (SHELL_INVALID_PARAMETER);
}
Path,
return (SHELL_ACCESS_DENIED);
}
//
// Get the Volume Info from ShellFileHandle
//
SysInfoSize = 0;
SysInfo);
if (Status == EFI_BUFFER_TOO_SMALL) {
SysInfo);
}
if (Delete) {
SysInfo);
}
}
SysInfo);
}
}
}
}
SysInfoSize = 0;
SysInfo);
if (Status == EFI_BUFFER_TOO_SMALL) {
SysInfo);
}
//
// print VolumeInfo table
//
0,
NULL,
);
}
return (ShellStatus);
}
{L"-d", TypeFlag},
{L"-n", TypeValue},
};
/**
Function for 'Vol' command.
@param[in] ImageHandle Handle to the Image (NULL if Internal).
@param[in] SystemTable Pointer to the System Table (NULL if Internal).
**/
)
{
Length = 0;
ProblemParam = NULL;
//
// initialize the shell lib (we must be in non-auto-init...)
//
Status = ShellInitialize();
//
// Fix local copies of the protocol pointers
//
Status = CommandInit();
//
// parse the command line
//
} else {
}
} else {
//
// check for "-?"
//
}
} else {
} else {
}
}
}
}
} else if (ShellStatus == SHELL_SUCCESS) {
);
}
}
}
}
//
// free the command line package
//
return (ShellStatus);
}