summaryrefslogtreecommitdiff
path: root/StdLib/LibC/Uefi/Devices
AgeCommit message (Collapse)AuthorFilesLines
2019-04-29edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFilesMichael D Kinney8-2530/+0
https://bugzilla.tianocore.org/show_bug.cgi?id=1734 Remove the following packages and move them to the new edk2-libc repository * AppPkg * StdLib * StdLibPrivateInternalFiles Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Daryl McDaniel <edk2-lists@mc2research.org> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
2018-06-29StdLib: Removing ipf which is no longer supported from edk2.chenc23-6/+6
Removing rules for Ipf sources file: * Remove the source file which path with "ipf" and also listed in [Sources.IPF] section of INF file. * Remove the source file which listed in [Components.IPF] section of DSC file and not listed in any other [Components] section. * Remove the embedded Ipf code for MDE_CPU_IPF. Removing rules for Inf file: * Remove IPF from VALID_ARCHITECTURES comments. * Remove DXE_SAL_DRIVER from LIBRARY_CLASS in [Defines] section. * Remove the INF which only listed in [Components.IPF] section in DSC. * Remove statements from [BuildOptions] that provide IPF specific flags. * Remove any IPF sepcific sections. Removing rules for Dec file: * Remove [Includes.IPF] section from Dec. Removing rules for Dsc file: * Remove IPF from SUPPORTED_ARCHITECTURES in [Defines] section of DSC. * Remove any IPF specific sections. * Remove statements from [BuildOptions] that provide IPF specific flags. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2016-01-10StdLib: Fix compilation errors caused by previous commit of daConsole.cDaryl McDaniel1-93/+95
Move functions da_ConFlush and da_ConClose to just before da_ConPoll so that they are defined after any calls to them. Replace da_ConFlush with the actual final implementation instead of the initial version which was committed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org> Reviewed-by: Michael Zimmermann <sigmaepsilon92@gmail.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19627 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-06StdLib: Implement da_ConFlush() and flush I/O buffers when closing a console ↵Daryl McDaniel1-71/+129
device. Add header file Efi/SysEfi.h Clean up some indent issues. Implement function da_ConFlush() Modify da_ConClose() to flush its buffers and clean up better upon close. Construct the console instance using the new da_ConFlush() instead of the nullop function. Remove da_ConFlush() from the "Not implemented (yet?)" place holder. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19587 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-11StdLib/AppPkg: Add the NOOPT build target and fix a type conversion problem ↵Daryl McDaniel1-1/+1
with VS2005. AppPkg.dsc: Remove IPF support and add NOOPT build target. StdLib.dsc: Add NOOPT build target. daConsole.c: Cast a comparison to BOOLEAN before assigning it to a BOOLEAN. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16331 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-31StdLib: Fix more GCC warnings/errors caused by variables being set but not used.Olivier Martin1-2/+0
Removed variables that had no effect on code behavior. Normalized comment formatting. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed by: Daryl McDaniel <daryl.mcdaniel@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16286 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-28StdLib: Some deployed versions of the Simple Text Input Protocol randomly ↵Daryl McDaniel1-76/+131
return either NUL characters or Scan Codes when just typing normal text. These changes filter out NUL characters and make Scan Code and error handling more robust. StdLibPrivateInternalFiles/Include/Device/Console.h: Change UnGetKey, in the ConInstance structure, from an EFI_INPUT_KEY structure to a CHAR16 variable. Include/sys/termios.h: Add CHAR_SUB and CHAR_ESC for translation of '^Z' and the Escape Scan Code into the EOF and ESC characters, respectively. LibC/Uefi/Devices/Console/daConsole.c: Add da_ConRawRead() function to simplify the read logic. Discard NUL characters from the input stream. In Blocking mode, retry until a non-NUL character is received. In NonBlocking mode, a NUL causes an EAGAIN error to be returned. Translate the Escape Scan Code into an ESC character. If Scan Codes are ignored, retry if in Blocking mode else return an EAGAIN error. UnGetKey becomes a single wide character instead of a structure. Change da_Poll() to use da_ConRawRead(). LibC/Uefi/InteractiveIO/IIOutilities.c: BUG fix. Return the processed input character instead of the raw character. Allows EOF propagation. LibC/Uefi/InteractiveIO/CanonRead.c: Enable EOF propagation. LibC/Uefi/InteractiveIO/IIOechoCtrl.h: Use symbols defined in termios.h instead of hard-coded constant numbers. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com> Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16254 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-18StdLib: Produce DevMedia as a library class alternative to DevShell.Daryl McDaniel1-0/+1
AppPkg: Replace existing DevShell dependencies with DevMedia. These patches will NOT cause existing code which uses DevShell to break. During an interim period, either DevShell or DevMedia may be used. In the future, DevShell will be removed from the code base. During the interim, DevShell and DevMedia refer to the same library. StdLib/LibC/Uefi/Devices/daShell.inf Make this library also satisfy the DevMedia library class. StdLib/StdLib.inc Add a library class definition for DevMedia AppPkg/Applications/OrderedCollectionTest/OrderedCollectionTest.inf AppPkg/Applications/Python/PythonCore.inf AppPkg/Applications/Sockets/GetAddrInfo/GetAddrInfo.inf AppPkg/Applications/Sockets/GetHostByAddr/GetHostByAddr.inf AppPkg/Applications/Sockets/GetHostByDns/GetHostByDns.inf AppPkg/Applications/Sockets/GetHostByName/GetHostByName.inf AppPkg/Applications/Sockets/GetNameInfo/GetNameInfo.inf AppPkg/Applications/Sockets/GetNetByAddr/GetNetByAddr.inf AppPkg/Applications/Sockets/GetNetByName/GetNetByName.inf AppPkg/Applications/Sockets/GetServByName/GetServByName.inf AppPkg/Applications/Sockets/GetServByPort/GetServByPort.inf AppPkg/Applications/Sockets/RecvDgram/RecvDgram.inf AppPkg/Applications/Sockets/SetHostName/SetHostName.inf AppPkg/Applications/Sockets/SetSockOpt/SetSockOpt.inf AppPkg/Applications/Sockets/TftpServer/TftpServer.inf AppPkg/Applications/Sockets/WebServer/WebServer.inf Change LibraryClass dependency from DevShell to DevMedia Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com> Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16142 6f19259b-4bc3-4df7-8a09-765794883524
2012-12-11StdLib: Add terminal type line editing (Interactive IO) for console devices.darylm5033-121/+234
Adds a subset of the terminal I/O capabilities described in the Single Unix Specification, V4. Supports: Erase previous character. Default is Backspace or ^H Erase line. Default is ^U TAB characters are supported and, by default, are rendered as 8 spaces. They will still be read as a single TAB character. Both Canonical and Non-Canonical modes are supported. If a terminal device is opened with O_TTY_INIT in the mode, the device will be initialized to "sane" values for interactive use. It will be in Canonical mode, Enter will be translated to NewLine and on output, a NewLine is translated to CRLF. Echoing will be on, control characters are output as ^X, and TABs are expanded. See the new <sys/termios.h> file for more information. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: daryl.mcdaniel@intel.com Reviewed-by: erik.c.bjorge@intel.com Reviewed-by: leroy.p.leahy@intel.com Reviewed-by: lee.g.rosenbaum@intel.com Reviewed-by: jaben.carsey@intel.com git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13989 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-18StdLib/LibC/Uefi/Devices/Console/daConsole.c: Fix bug where unconvertable ↵darylm5031-1/+2
wide characters would cause the code to hang or generate an exception. When the WideTtyCvt() function encountered an unconvertable character, it properly replaced it but did not update the byte count, numB, to 1 and instead left it at -1. This fix sets numB to 1 when an unconvertable character is replaced. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: tim.lewis@insidesw.com Reviewed-by: daryl.mcdaniel@intel.com Reviewed-by: erik.c.bjorge@intel.com git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13540 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-20StdLib/LibC/Uefi/Devices/Console/daConsole.c: Fix name of the XY offset union.darylm5031-1/+1
The XYoffset union typedef has been renamed to XY_OFFSET to conform to the C Coding Standards. Fixes a build error. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: daryl.mcdaniel@intel.com Reviewed-by: erik.c.bjorge@intel.com git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13462 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-15StdLib: Add multi-byte character support. The normal "narrow" character set ↵darylm5031-37/+43
is now UTF-8 instead of ASCII. Add library classes which are required by StdLib, but not commonly defined in Platform DSC files, to StdLib.inc. Modify MB_LEN_MAX to be 4, the maximum length of UTF-8 characters. Adjust size of internal buffers to be multiples of MB_LEN_MAX instead of assuming 1-byte characters. Make the XYoffset object public and move its declaration into EfiSysCall.h. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: daryl.mcdaniel@intel.com Reviewed-by: erik.c.bjorge@intel.com Reviewed-by: lee.g.rosenbaum@intel.com Reviewed-by: leroy.p.leahy@intel.com git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13457 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-30StdLib: Add isDirSep character classification macro and function. Implement ↵darylm5032-10/+180
several Posix functions and clean up EfiSysCall.h. Align file mode handling with UEFI file protocol flags. Include/ctype.h: Function declaration and Macro definition of isDirSep Include/unistd.h: Declarations added from EfiSysCall.h Include/utime.h: New file. For the Posix utime() function. Include/sys/_ctype.h: Update character class bit maps. Include/sys/EfiSysCall.h: Move declarations to unistd.h Include/sys/fcntl.h: Improve comments. Add UEFI-specific macros. Include/sys/filio.h: Remove declarations for unsupported file ioctls. Include/sys/stat.h: Fix flags. Add macros and declarations. Include/sys/time.h: Add declarations for new functions Tm2Efi() and Time2Efi(). Include/sys/types.h: Use EFI-specific instead of BSD-specific definitions for typedefs. Include/sys/unistd.h: Delete inappropriate content. Guard macro definitions. LibC/Locale/setlocale.c LibC/Stdio/{fdopen.c, findfp.c, fopen.c, freopen.c, gettemp.c, makebuf.c, mktemp.c, remove.c, stdio.c, tempnam.c, tmpfile.c, tmpnam.c} LibC/Time/{itimer.c, ZoneProc.c} LibC/Uefi/SysCalls.c LibC/Uefi/Devices/Console/daConsole.c LibC/Uefi/Devices/UefiShell/daShell.c PosixLib/Gen/readdir.c Include unistd.h instead of EfiSysCall.h LibC/Ctype/CClass.c: Character classification function implementation for isDirSep. LibC/Ctype/iCtype.c: Update character classification and case conversion tables. LibC/Time/TimeEfi.c: Improve comments. Implement new functions Tm2Efi() and Time2Efi(). LibC/Uefi/StubFunctions.c: Add missing include. Cosmetic changes to declarations. LibC/Uefi/SysCalls.c: Add support function for utime(). LibC/Uefi/Uefi.inf: Add LibGen library class dependency. LibC/Uefi/Xform.c: Enhance Omode2EFI(). LibC/Uefi/Devices/UefiShell/daShell.c: Enhance da_ShellMkdir. Implement da_ShellIoctl to set file times. PosixLib/Gen/access.c: New file. Implement the access() function. PosixLib/Gen/dirname.c: Enhance to use isDirSep and differentiate between the device, path, and filename components of UEFI Shell-style paths. PosixLib/Gen/utime.c: New file. Implement the utime() function. PosixLib/Gen/LibGen.inf: Change MODULE_TYPE. Add new files. Signed-off-by: darylm503 Reviewed-by: geekboy15a Reviewed-by: jljusten Reviewed-by: Rahul Khana Reviewed-by: leegrosenbaum git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12800 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-03StdLib: Improve robustness of stat() and make basename() a public function.darylm5031-2/+2
AppPkg: Refinements to pyconfig.h and port of getpath.c to EDK II. Signed-off-by: darylm503 Reviewed-by: geekboy15a Reviewed-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12508 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-16StdLib: Change the last argument of the ioctl helper functions to va_list* ↵darylm5033-3/+6
from void*. Functions which call these helper functions always pass the last parameter as a va_list argument. Add a conditional block around a MSFT-only pragma so that stringlist.c will compile with GCC. Comment-out the Socket Library components within StdLib.dsc. These components are still in development. Signed-off-by: darylm503 Reviewed by: geekboy15A git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12369 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-04Update or add comments to files and functions for use by Doxygen.darylm5031-0/+2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12090 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-30Add Socket Libraries.darylm5037-154/+252
Add Posix functions for porting compatibility. Fix compliance issues with ISO/IEC 9899:199409 New Functions: setenv(), fparseln(), GetFileNameFromPath(), rename(), realpath(), setprogname(), getprogname(), strlcat(), strlcpy(), strsep(), setitimer(), getitimer(), timegm(), getopt(), basename(), mkstemp(), ffs(), vsnprintf(), snprintf(), getpass(), usleep(), select(), writev(), strcasecmp(), getcwd(), chdir(), tcgetpgrp(), getpgrp(), gettimeofday(), bcopy(), git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12061 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-28Add device abstraction code for the UEFI Console and UEFI Shell-based file ↵darylm5038-0/+2023
systems. Make argv use narrow characters instead of wide characters. Add setenv functionality. Add poll() system call. Change signal names into macros – required for standards compliance. The enums were renamed and moved to sys/signal.h and the new macros reference the enums. Added SIGBREAK, which is required for Python. Modify stdio functions to fail cleanly when called with a NULL File Pointer argument. Added <sys/cdefs.h> that just includes <sys/EfiCdefs.h>. By adding this wrapper, we improve compatibility with *nix files which assume <sys/cdefs> exists. Add <netdb.h> Added macros for bcopy(), bcmp() and strsep(). Modify the clock() function so that it does not hang when running under an emulation environment such as NT32. Move TM structure specific macros from the private tzfile.h into <time.h> Add strncasecmp function. Add strptime function. Add gettimeofday function. Add getcwd function. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11908 6f19259b-4bc3-4df7-8a09-765794883524