Date: Fri, 27 Oct 2006 23:02:20 GMT From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 108580 for review Message-ID: <200610272302.k9RN2KhD053633@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=108580 Change 108580 by marcel@marcel_cluster on 2006/10/27 23:02:06 o In efifs_open(), f->f_fsdata may contain junk. Don't test for it. o In efifs_open(), s/if/while/ to remove all duplicated '/' characters in the path. o In efifs_open(), also test for EFI_ACCESS_DENIED to determine whether we should try to open in R/O mode. o In efifs_read() and efifs_write(), remove the call to twiddle(). Affected files ... .. //depot/projects/ia64/sys/boot/efi/libefi/efifs.c#10 edit Differences ... ==== //depot/projects/ia64/sys/boot/efi/libefi/efifs.c#10 (text+ko) ==== @@ -87,9 +87,6 @@ dev->d_unit >= fs_handle_count) return (EINVAL); - if (f->f_fsdata != NULL) - return (EBUSY); - status = BS->HandleProtocol(fs_handles[dev->d_unit], &sfs_guid, (VOID **)&fsif); if (EFI_ERROR(status)) @@ -119,7 +116,7 @@ while (*upath != '\0') { if (*upath == '/') { *cp = '\\'; - if (upath[1] == '/') + while (upath[1] == '/') upath++; } else *cp = *upath; @@ -131,7 +128,7 @@ /* Open the file. */ status = root->Open(root, &file, path, EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE, 0); - if (status == EFI_WRITE_PROTECTED) + if (status == EFI_ACCESS_DENIED || status == EFI_WRITE_PROTECTED) status = root->Open(root, &file, path, EFI_FILE_MODE_READ, 0); free(path); root->Close(root); @@ -172,7 +169,6 @@ if (sz > EFI_BLOCK_SIZE) sz = EFI_BLOCK_SIZE; status = file->Read(file, &sz, bufp); - twiddle(); if (EFI_ERROR(status)) return (status_to_errno(status)); if (sz == 0) @@ -202,7 +198,6 @@ if (sz > EFI_BLOCK_SIZE) sz = EFI_BLOCK_SIZE; status = file->Write(file, &sz, bufp); - twiddle(); if (EFI_ERROR(status)) return (status_to_errno(status)); if (sz == 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610272302.k9RN2KhD053633>