Fix issue with fixing tabs.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11297 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
andrewfish
2011-02-02 23:19:30 +00:00
parent 5d23922674
commit 2ac288f919
73 changed files with 2559 additions and 2559 deletions

View File

@@ -94,20 +94,20 @@ Abstract:
typedef struct {
UINTN tv_sec; /* seconds */
UINTN tv_nsec; /* and nanoseconds */
UINTN tv_sec; /* seconds */
UINTN tv_nsec; /* and nanoseconds */
} EFI_timespec;
typedef struct stat_fix { \
dev_t st_dev; /* [XSI] ID of device containing file */
mode_t st_mode; /* [XSI] Mode of file (see below) */
nlink_t st_nlink; /* [XSI] Number of hard links */
__darwin_ino64_t st_ino; /* [XSI] File serial number */
uid_t st_uid; /* [XSI] User ID of the file */
gid_t st_gid; /* [XSI] Group ID of the file */
dev_t st_rdev; /* [XSI] Device ID */
dev_t st_dev; /* [XSI] ID of device containing file */
mode_t st_mode; /* [XSI] Mode of file (see below) */
nlink_t st_nlink; /* [XSI] Number of hard links */
__darwin_ino64_t st_ino; /* [XSI] File serial number */
uid_t st_uid; /* [XSI] User ID of the file */
gid_t st_gid; /* [XSI] Group ID of the file */
dev_t st_rdev; /* [XSI] Device ID */
// clang for X64 ABI follows Windows and a long is 32-bits
// this breaks system inlcude files so that is why we need
@@ -117,44 +117,44 @@ typedef struct stat_fix { \
EFI_timespec st_ctimespec;
EFI_timespec st_birthtimespec;
off_t st_size; /* [XSI] file size, in bytes */
blkcnt_t st_blocks; /* [XSI] blocks allocated for file */
blksize_t st_blksize; /* [XSI] optimal blocksize for I/O */
__uint32_t st_flags; /* user defined flags for file */
__uint32_t st_gen; /* file generation number */
__int32_t st_lspare; /* RESERVED: DO NOT USE! */
__int64_t st_qspare[2]; /* RESERVED: DO NOT USE! */
off_t st_size; /* [XSI] file size, in bytes */
blkcnt_t st_blocks; /* [XSI] blocks allocated for file */
blksize_t st_blksize; /* [XSI] optimal blocksize for I/O */
__uint32_t st_flags; /* user defined flags for file */
__uint32_t st_gen; /* file generation number */
__int32_t st_lspare; /* RESERVED: DO NOT USE! */
__int64_t st_qspare[2]; /* RESERVED: DO NOT USE! */
} STAT_FIX;
#else /* !__DARWIN_64_BIT_INO_T */
typedef struct stat_fix {
dev_t st_dev; /* [XSI] ID of device containing file */
ino_t st_ino; /* [XSI] File serial number */
mode_t st_mode; /* [XSI] Mode of file (see below) */
nlink_t st_nlink; /* [XSI] Number of hard links */
uid_t st_uid; /* [XSI] User ID of the file */
gid_t st_gid; /* [XSI] Group ID of the file */
dev_t st_rdev; /* [XSI] Device ID */
dev_t st_dev; /* [XSI] ID of device containing file */
ino_t st_ino; /* [XSI] File serial number */
mode_t st_mode; /* [XSI] Mode of file (see below) */
nlink_t st_nlink; /* [XSI] Number of hard links */
uid_t st_uid; /* [XSI] User ID of the file */
gid_t st_gid; /* [XSI] Group ID of the file */
dev_t st_rdev; /* [XSI] Device ID */
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
struct timespec st_atimespec; /* time of last access */
struct timespec st_mtimespec; /* time of last data modification */
struct timespec st_ctimespec; /* time of last status change */
struct timespec st_atimespec; /* time of last access */
struct timespec st_mtimespec; /* time of last data modification */
struct timespec st_ctimespec; /* time of last status change */
#else
time_t st_atime; /* [XSI] Time of last access */
long st_atimensec; /* nsec of last access */
time_t st_mtime; /* [XSI] Last data modification time */
long st_mtimensec; /* last data modification nsec */
time_t st_ctime; /* [XSI] Time of last status change */
long st_ctimensec; /* nsec of last status change */
time_t st_atime; /* [XSI] Time of last access */
long st_atimensec; /* nsec of last access */
time_t st_mtime; /* [XSI] Last data modification time */
long st_mtimensec; /* last data modification nsec */
time_t st_ctime; /* [XSI] Time of last status change */
long st_ctimensec; /* nsec of last status change */
#endif
off_t st_size; /* [XSI] file size, in bytes */
blkcnt_t st_blocks; /* [XSI] blocks allocated for file */
blksize_t st_blksize; /* [XSI] optimal blocksize for I/O */
__uint32_t st_flags; /* user defined flags for file */
__uint32_t st_gen; /* file generation number */
__int32_t st_lspare; /* RESERVED: DO NOT USE! */
__int64_t st_qspare[2]; /* RESERVED: DO NOT USE! */
off_t st_size; /* [XSI] file size, in bytes */
blkcnt_t st_blocks; /* [XSI] blocks allocated for file */
blksize_t st_blksize; /* [XSI] optimal blocksize for I/O */
__uint32_t st_flags; /* user defined flags for file */
__uint32_t st_gen; /* file generation number */
__int32_t st_lspare; /* RESERVED: DO NOT USE! */
__int64_t st_qspare[2]; /* RESERVED: DO NOT USE! */
} STAT_FIX;
#endif

View File

@@ -192,7 +192,7 @@ struct _EFI_UNIX_UGA_IO_PROTOCOL;
typedef
EFI_STATUS
(EFIAPI *UnixUgaCreate)(struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo,
CONST CHAR16 *Title);
CONST CHAR16 *Title);
typedef
int
@@ -229,7 +229,7 @@ int
typedef
int
(EFIAPI *UnixTcsetattr) (int __fd, int __optional_actions,
__const struct termios *__termios_p);
__const struct termios *__termios_p);
//
@@ -292,13 +292,13 @@ typedef struct _EFI_UNIX_THUNK_PROTOCOL {
UINT64 Signature;
UnixSleep Sleep;
UnixExit Exit;
UnixExit Exit;
UnixSetTimer SetTimer;
UnixGetLocalTime GetLocalTime;
UnixGetLocalTime GetLocalTime;
UnixGmTime GmTime;
UnixGetTimeZone GetTimeZone;
UnixGetDayLight GetDayLight;
UnixPoll Poll;
UnixPoll Poll;
UnixRead Read;
UnixWrite Write;
UnixGetenv Getenv;
@@ -322,7 +322,7 @@ typedef struct _EFI_UNIX_THUNK_PROTOCOL {
UnixChmod Chmod;
UnixUTime UTime;
UnixTcflush Tcflush;
UnixUgaCreate UgaCreate;
UnixUgaCreate UgaCreate;
UnixPerror Perror;
UnixIoCtl IoCtl;
UnixFcntl Fcntl;

View File

@@ -81,23 +81,23 @@ EFI_STATUS
typedef struct {
UINTN SourceX;
UINTN SourceY;
UINTN DestinationX;
UINTN DestinationY;
UINTN Width;
UINTN Height;
UINTN Delta;
UINTN SourceX;
UINTN SourceY;
UINTN DestinationX;
UINTN DestinationY;
UINTN Width;
UINTN Height;
UINTN Delta;
} UGA_BLT_ARGS;
typedef
EFI_STATUS
(EFIAPI *UGABlt)(
IN EFI_UNIX_UGA_IO_PROTOCOL *Uga,
IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,
IN EFI_UGA_BLT_OPERATION BltOperation,
IN UGA_BLT_ARGS *Args
);
IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,
IN EFI_UGA_BLT_OPERATION BltOperation,
IN UGA_BLT_ARGS *Args
);
typedef
BOOLEAN

View File

@@ -134,7 +134,7 @@ OemHookStatusCodeReport (
mStdOut,
Buffer,
CharCount
);
);
return EFI_SUCCESS;

View File

@@ -56,7 +56,7 @@ DxeUnixPeCoffLibExtraActionConstructor (
IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_HOB_GUID_TYPE *GuidHob;
EFI_HOB_GUID_TYPE *GuidHob;
//
// Retrieve UnixThunkProtocol from GUID'ed HOB

View File

@@ -55,7 +55,7 @@ Returns:
--*/
{
PEI_UNIX_THUNK_PPI *UnixThunkPpi;
PEI_UNIX_THUNK_PPI *UnixThunkPpi;
EFI_STATUS Status;
EFI_UNIX_THUNK_PROTOCOL *Unix;

View File

@@ -142,7 +142,7 @@ OemHookStatusCodeReport (
mStdOut,
Buffer,
CharCount
);
);
return EFI_SUCCESS;

View File

@@ -48,7 +48,7 @@ EFIAPI
UnixPeCoffGetUnixThunkStucture (
)
{
PEI_UNIX_THUNK_PPI *UnixThunkPpi;
PEI_UNIX_THUNK_PPI *UnixThunkPpi;
EFI_STATUS Status;

View File

@@ -398,7 +398,7 @@ GasketUgaBlt (
EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,
IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,
IN EFI_UGA_BLT_OPERATION BltOperation,
IN UGA_BLT_ARGS *Args
IN UGA_BLT_ARGS *Args
)
{
return GasketUintnUintnUintnUintn (UgaBlt, (UINTN)UgaIo, (UINTN)BltBuffer, (UINTN)BltOperation, (UINTN)Args);

View File

@@ -264,21 +264,21 @@ _GasketUintnUint16:
.globl _ReverseGasketUint64
_ReverseGasketUint64:
pushl %ebp
movl %esp, %ebp
subl $40, %esp
movl 12(%ebp), %eax
movl %eax, -16(%ebp)
movl 16(%ebp), %eax
movl %eax, -12(%ebp)
movl -16(%ebp), %eax
movl -12(%ebp), %edx
movl %eax, (%esp)
movl %edx, 4(%esp)
movl 8(%ebp), %eax
call *%eax
leave
ret
pushl %ebp
movl %esp, %ebp
subl $40, %esp
movl 12(%ebp), %eax
movl %eax, -16(%ebp)
movl 16(%ebp), %eax
movl %eax, -12(%ebp)
movl -16(%ebp), %eax
movl -12(%ebp), %edx
movl %eax, (%esp)
movl %edx, 4(%esp)
movl 8(%ebp), %eax
call *%eax
leave
ret
.globl _ReverseGasketUint64Uint64
@@ -314,31 +314,31 @@ _ReverseGasketUint64Uint64:
.globl _GasketSecUnixPeiLoadFile
_GasketSecUnixPeiLoadFile:
jmp _SecUnixPeiLoadFile
jmp _SecUnixPeiLoadFile
.globl _GasketSecUnixPeiAutoScan
_GasketSecUnixPeiAutoScan:
jmp _SecUnixPeiAutoScan
jmp _SecUnixPeiAutoScan
.globl _GasketSecUnixUnixThunkAddress
_GasketSecUnixUnixThunkAddress:
jmp _SecUnixUnixThunkAddress
jmp _SecUnixUnixThunkAddress
.globl _GasketSecPeiReportStatusCode
_GasketSecPeiReportStatusCode:
jmp _SecPeiReportStatusCode
jmp _SecPeiReportStatusCode
.globl _GasketSecUnixFdAddress
_GasketSecUnixFdAddress:
jmp _SecUnixFdAddress
jmp _SecUnixFdAddress
.globl _GasketSecTemporaryRamSupport
_GasketSecTemporaryRamSupport:
jmp _SecTemporaryRamSupport
jmp _SecTemporaryRamSupport
#endif

View File

@@ -279,17 +279,17 @@ Returns:
// Open the FD and remmeber where it got mapped into our processes address space
//
Status = MapFile (
FileName,
&gFdInfo[Index].Address,
&gFdInfo[Index].Size
);
FileName,
&gFdInfo[Index].Address,
&gFdInfo[Index].Size
);
if (EFI_ERROR (Status)) {
printf ("ERROR : Can not open Firmware Device File %s (%x). Exiting.\n", FileName, (unsigned int)Status);
exit (1);
}
printf (" FD loaded from %s at 0x%08lx",
FileName, (unsigned long)gFdInfo[Index].Address);
FileName, (unsigned long)gFdInfo[Index].Address);
if (PeiCoreFile == NULL) {
//
@@ -419,10 +419,10 @@ Returns:
/* Read entry address. */
lseek (fd, FileSize - 0x20, SEEK_SET);
if (read (fd, &EntryAddress, 4) != 4)
{
close (fd);
return EFI_DEVICE_ERROR;
}
{
close (fd);
return EFI_DEVICE_ERROR;
}
}
#endif
@@ -664,8 +664,8 @@ Returns:
*MemoryBase = 0;
res = MapMemory(0, gSystemMemory[Index].Size,
PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_PRIVATE | MAP_ANONYMOUS);
PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_PRIVATE | MAP_ANONYMOUS);
if (res == MAP_FAILED)
return EFI_DEVICE_ERROR;
*MemorySize = gSystemMemory[Index].Size;

View File

@@ -59,7 +59,7 @@ typedef struct {
EFI_UNIX_UGA_IO_PROTOCOL UgaIo;
Display *display;
int screen; /* values for window_size in main */
int screen; /* values for window_size in main */
Window win;
GC gc;
Visual *visual;
@@ -393,15 +393,15 @@ handleMouseMoved(UGA_IO_PRIVATE *drv, XEvent *ev)
if ( ev->xmotion.x != drv->previous_x )
{
drv->pointer_state.RelativeMovementX += ( ev->xmotion.x - drv->previous_x );
drv->previous_x = ev->xmotion.x;
drv->pointer_state_changed = 1;
drv->previous_x = ev->xmotion.x;
drv->pointer_state_changed = 1;
}
if ( ev->xmotion.y != drv->previous_y )
{
drv->pointer_state.RelativeMovementY += ( ev->xmotion.y - drv->previous_y );
drv->previous_y = ev->xmotion.y;
drv->pointer_state_changed = 1;
drv->pointer_state_changed = 1;
}
drv->pointer_state.RelativeMovementZ = 0;
@@ -413,12 +413,12 @@ handleMouseDown(UGA_IO_PRIVATE *drv, XEvent *ev, BOOLEAN Pressed)
if ( ev->xbutton.button == Button1 )
{
drv->pointer_state_changed = ( drv->pointer_state.LeftButton != Pressed );
drv->pointer_state.LeftButton = Pressed;
drv->pointer_state.LeftButton = Pressed;
}
if ( ev->xbutton.button == Button2 )
{
drv->pointer_state_changed = ( drv->pointer_state.RightButton != Pressed );
drv->pointer_state.RightButton = Pressed;
drv->pointer_state.RightButton = Pressed;
}
}
@@ -460,10 +460,10 @@ HandleEvent(UGA_IO_PRIVATE *drv, XEvent *ev)
break;
case ButtonPress:
handleMouseDown(drv, ev, TRUE);
break;
break;
case ButtonRelease:
handleMouseDown(drv, ev, FALSE);
break;
break;
#if 0
case DestroyNotify:
XCloseDisplay (drv->display);

File diff suppressed because it is too large Load Diff

View File

@@ -39,8 +39,8 @@
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(PeiSwitchStacks)
ASM_PFX(PeiSwitchStacks):
pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
movq %r8, %rsp
@@ -52,7 +52,7 @@ ASM_PFX(PeiSwitchStacks):
# Reserve space for register parameters (rcx, rdx, r8 & r9) on the stack,
# in case the callee wishes to spill them.
#
subq $32, %rsp // 32-byte shadow space plus alignment pad
subq $32, %rsp // 32-byte shadow space plus alignment pad
call *%rax
@@ -76,8 +76,8 @@ ASM_PFX(PeiSwitchStacks):
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(UnixPeiSwitchStacks)
ASM_PFX(UnixPeiSwitchStacks):
pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
mov %rdi, %rax
mov %rsi, %rdi
@@ -105,7 +105,7 @@ ASM_PFX(UnixPeiSwitchStacks):
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(SecSwitchStack)
ASM_PFX(SecSwitchStack):
pushq %rbp // stack frame is for the debugger
pushq %rbp // stack frame is for the debugger
movq %rsp, %rbp
mov %rsp, %rax

View File

@@ -227,7 +227,7 @@ Returns:
//
if (TimerPeriod == 0
|| ((TimerPeriod > TIMER_MINIMUM_VALUE)
&& (TimerPeriod < TIMER_MAXIMUM_VALUE))) {
&& (TimerPeriod < TIMER_MAXIMUM_VALUE))) {
mTimerPeriodMs = DivU64x32 (TimerPeriod + 5000, 10000);
gUnix->SetTimer (mTimerPeriodMs, TimerCallback);

View File

@@ -149,7 +149,7 @@ UnixBlockIoDriverDiagnosticsRunDiagnostics (
*ErrorType = &gEfiBlockIoProtocolGuid;
*BufferSize = 0x60;
gBS->AllocatePool (EfiBootServicesData, (UINTN) (*BufferSize),
(void *)Buffer);
(void *)Buffer);
CopyMem (*Buffer, L"Unix Block I/O Driver Diagnostics Failed\n", *BufferSize);
return EFI_DEVICE_ERROR;
}

View File

@@ -410,7 +410,7 @@ Returns:
BOOLEAN WriteProtected;
UINTN NumberOfBlocks;
UINTN BlockSize;
INTN i;
INTN i;
//
// Grab the protocols we need

View File

@@ -468,7 +468,7 @@ Returns:
UnixDevice->ControllerNameTable = NULL;
// FIXME: check size
// FIXME: check size
StrCpy(ComponentName, UnixDevice->UnixIo.EnvString);
UnixDevice->DevicePath = UnixBusCreateDevicePath (

View File

@@ -191,10 +191,10 @@ extern EFI_COMPONENT_NAME_PROTOCOL gUnixSerialIoComponentName;
#define __MAX_BAUD B4000000
#endif
#ifndef CMSPAR
#define CMSPAR 010000000000 /* mark or space (stick) parity */
#define CMSPAR 010000000000 /* mark or space (stick) parity */
#endif
#ifndef FIONREAD
#define FIONREAD 0x541B
#define FIONREAD 0x541B
#endif
//
// Function Prototypes

View File

@@ -350,9 +350,9 @@ Done:
if (Private != NULL) {
if (Private->VolumeLabel != NULL)
gBS->FreePool (Private->VolumeLabel);
gBS->FreePool (Private->VolumeLabel);
if (Private->FilePath != NULL)
gBS->FreePool (Private->FilePath);
gBS->FreePool (Private->FilePath);
FreeUnicodeStringTable (Private->ControllerNameTable);
gBS->FreePool (Private);
@@ -862,7 +862,7 @@ OpenRoot:
// Create a directory
//
if (NewPrivateFile->UnixThunk->MkDir (NewPrivateFile->FileName, 0777) != 0) {
INTN LastError;
INTN LastError;
LastError = PrivateFile->UnixThunk->GetErrno ();
if (LastError != EEXIST) {
@@ -897,9 +897,9 @@ OpenRoot:
0666);
if (NewPrivateFile->fd < 0) {
if (PrivateFile->UnixThunk->GetErrno () == ENOENT) {
Status = EFI_NOT_FOUND;
Status = EFI_NOT_FOUND;
} else {
Status = EFI_ACCESS_DENIED;
Status = EFI_ACCESS_DENIED;
}
}
}
@@ -1184,7 +1184,7 @@ Returns:
}
if (PrivateFile->UnixThunk->Stat (
FileName == NULL ? PrivateFile->FileName : FileName,
&buf) < 0)
&buf) < 0)
return EFI_DEVICE_ERROR;
Status = EFI_SUCCESS;
@@ -1285,9 +1285,9 @@ Returns:
}
Res = PrivateFile->UnixThunk->Read (
PrivateFile->fd,
Buffer,
*BufferSize);
PrivateFile->fd,
Buffer,
*BufferSize);
if (Res < 0) {
Status = EFI_DEVICE_ERROR;
goto Done;
@@ -1336,14 +1336,14 @@ Returns:
if (EFI_ERROR (Status)) {
goto Done;
}
AsciiStrCpy(FullFileName, PrivateFile->FileName);
AsciiStrCat(FullFileName, "/");
AsciiStrCat(FullFileName, PrivateFile->Dirent->d_name);
Status = UnixSimpleFileSystemFileInfo (PrivateFile,
FullFileName,
BufferSize,
Buffer);
FullFileName,
BufferSize,
Buffer);
gBS->FreePool (FullFileName);
PrivateFile->Dirent = NULL;
@@ -1423,9 +1423,9 @@ Returns:
}
Res = PrivateFile->UnixThunk->Write (
PrivateFile->fd,
Buffer,
*BufferSize);
PrivateFile->fd,
Buffer,
*BufferSize);
if (Res == (UINTN)-1) {
Status = EFI_DEVICE_ERROR;
goto Done;
@@ -1850,7 +1850,7 @@ Returns:
}
Status = gBS->AllocatePool (EfiBootServicesData, OldInfoSize,
(VOID **)&OldFileInfo);
(VOID **)&OldFileInfo);
if (EFI_ERROR (Status)) {
goto Done;

File diff suppressed because it is too large Load Diff

View File

@@ -46,33 +46,33 @@ Abstract:
typedef struct
{
UINT32 Signature;
UINT32 Signature;
EFI_UNIX_THUNK_PROTOCOL* UnixThunk;
EFI_UNIX_THUNK_PROTOCOL* UnixThunk;
EFI_HANDLE DeviceHandle;
EFI_DEVICE_PATH_PROTOCOL* DevicePath;
EFI_HANDLE DeviceHandle;
EFI_DEVICE_PATH_PROTOCOL* DevicePath;
EFI_MAC_ADDRESS MacAddress;
EFI_MAC_ADDRESS MacAddress;
CHAR8* InterfaceName;
INTN ReadBufferSize;
VOID* ReadBuffer;
//
// Two walking pointers to manage the multiple packets that can be returned
// in a single read.
//
VOID* CurrentReadPointer;
VOID* EndReadPointer;
CHAR8* InterfaceName;
INTN ReadBufferSize;
VOID* ReadBuffer;
//
// Two walking pointers to manage the multiple packets that can be returned
// in a single read.
//
VOID* CurrentReadPointer;
VOID* EndReadPointer;
INTN BpfFd;
INTN BpfFd;
EFI_SIMPLE_NETWORK_PROTOCOL Snp;
EFI_SIMPLE_NETWORK_MODE Mode;
EFI_SIMPLE_NETWORK_PROTOCOL Snp;
EFI_SIMPLE_NETWORK_MODE Mode;
} UNIX_SNP_PRIVATE_DATA;
#define UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS(a) \
CR( a, UNIX_SNP_PRIVATE_DATA, Snp, UNIX_SNP_PRIVATE_DATA_SIGNATURE )
CR( a, UNIX_SNP_PRIVATE_DATA, Snp, UNIX_SNP_PRIVATE_DATA_SIGNATURE )
extern EFI_DRIVER_BINDING_PROTOCOL gUnixSnpDriverBinding;
extern EFI_COMPONENT_NAME_PROTOCOL gUnixSnpDriverComponentName;
@@ -153,4 +153,4 @@ UnixSnpDriverBindingStop (
IN EFI_HANDLE *ChildHandleBuffer
);
#endif // _UNIX_SNP_H_
#endif // _UNIX_SNP_H_