summaryrefslogtreecommitdiff
path: root/sys/lib/libsa/cd9660.c
AgeCommit message (Collapse)Author
2019-03-31fix warnings, printf formats, etc.christos
2018-03-08Add missed file in previous commit.nonaka
> efiboot: system can boot from CD/DVD-ROM media.
2014-03-20reduce size by 1K by sharing the ls code.christos
2012-07-23Fix cd9660_read() to not read past the end of the file. This would resultmhitch
in incorrect resid values, and causes the read of /boot.cfg to ignore the file. If the requested transfer extends past the end of the file, force the internal buffer to be used, and when transferring data from the internal buffer, limit the transfer to what's left in the file. CDROM boot will now process the /boot.cfg file.
2011-12-25Apply the following patch submitted by Evgeniy Ivanov:tsutsui
http://mail-index.NetBSD.org/tech-kern/2011/12/15/msg012226.html http://mail-index.NetBSD.org/tech-kern/2011/12/17/msg012229.html - add 'ls' op to struct fs_ops to support ls command on each fs, enabled by -DLIBSA_ENABLE_LS_OP and SAMISCMAKEFLAGS+="SA_ENABLE_LS_OP=yes" in libsa - split sys/lib/libsa/ufs_ls.c into UFS specific part and MI part (ls.c) that opens the target fs and calls fs-depedent XXX_ls() functions - add a ls op for ext2fs (all other fs than ufs and ext2fs don't have actual ls ops yet) - replace existing MD ufs_ls() calls with this new MI ls() The original patch was written for i386 and ext2fs. zaurus zboot has been tested by nonaka@. ews4800mips and x68k loaders have been tested by me (with several fixes). landisk might be okay since it was almost copied from i386. XXX1: "ls" op in fs_ops looks a bit inconsistent, but we will be able to replace it with real fs ops like readdir if it's really worth XXX2: someone might have to check sys/arch/ia64/stand/efi/libefi/efifs_ls.c
2011-06-16Add an optional MD calling convention flag for use in libsa when spacejoerg
optimisation is critical. Use this on i386 to switch to register passing calling convention for the file system entry points and most assembler call backs that have to preserve at least 3 registers.
2010-10-18Allow multiple path separators between/after directory names.ws
Problem found while analyzing PR kern/43963.
2010-03-22Ensure cd9660_read() gives accurate EOF indication.jakllsch
Should fix PR/42983.
2008-11-19For the x86 boot loader, autoload a kernel module corresponding to thead
root file system type.
2007-11-24style, indent, and ANSI-fy.isaki
2007-03-05We need char* for pointer arithmetic.he
2007-03-04Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.christos
2006-01-25free -> deallocchristos
2005-12-11merge ktrace-lwp.christos
2005-06-13Oops, missed a semicolon.junyoung
2005-06-13ANSI, De-__P(), and some cosmetic changes includingjunyoung
bcmp -> memcmp, bzero -> memset, bcopy -> memcpy.
2005-02-26nuke trailing whitespaceperry
2003-10-18Rename local variables `read' to `nread' to shut up -Wshadow.itohy
2003-08-21make 'path' argument to cd9660_open 'const char *' and fix the fallout.elric
2002-12-30Fix broken build due too the move of the cd9660 and msdosfs kernel source code.veego
2001-04-05libkern.h now has the ctype routines.thorpej
1999-11-23Remove leading '/' from pathnames, using same logic as ufs.c. Allows newsimonb
style (but not yet committed) pmax bootblocks to open "/boot.pmax" on an ISO image. Same problem reported for NFS by Jason Thorpe.
1999-11-13Backout my libsa changes.thorpej
1999-11-11Update for the improvements to libsa, and don't reference libkern.h.thorpej
1999-03-31Make a bunch of backward-compatible changes to the boot blocks which allowcgd
size to be reduced substantially. (backward compatibility verified by compiling one of the alpha boot blocks which uses all of the code before and after, diffing the object files, and manually verifying that the differences were 'correct'. some differences were "unavoidable," it wanting to avoid a double-commit, because e.g. local variables which were previously used were no longer used.) a README which describes supported options (or at least the ones mentioned below) is forthcoming. add support for the preprocessor macro LIBSA_NO_TWIDDLE, which causes calls to twiddle() to be omitted if it's defined. add support for the preprocessor macros: LIBSA_NO_FS_CLOSE LIBSA_NO_FS_WRITE LIBSA_NO_FS_SEEK which, if defined, cause the corresponding file system operations in the individual file system implementations to be omitted. (note that all of those macros are not supported by all file systems at this point. comments were added to individual file system files to indicate lack of support, and should be cleaned up later. Backward compatibility options e.g. UFS_NOCLOSE, etc., are supported.) add support for the preprocessor macro LIBSA_NO_FS_SYMLINK, which removes support for symbolic links from the file system support functions. (same notes as for the macros above apply.) add support for the preprocessor macro LIBSA_FS_SINGLECOMPONENT which removes all subdirectory and symlink support from the file system support functions. (same notes as for the macros above apply.) add support for the preprocessor macro LIBSA_NO_FD_CHECKING, which causes code relating to libsa file descriptor checks (e.g. range checking and checking that a file descriptor is valid) to be omitted if it's defined. add support for the preprocessor macro LIBSA_NO_RAW_ACCESS, which causes code relating to raw device access to be omitted if it's defined. change some structure copies to use bcopy() instead. that way use of bcopy vs. memcpy() can easily be selected by LIBSA_USE_MEMCPY. (without changes like these, you could end up having both bcopy() and memcpy() included. eventually, all calls to bcopy should be changed to calls to memcpy() or memmove() as appropriate -- hopefully never the latter -- with an option to use bcopy instead.) add support for the preprocessor macro LIBSA_NO_DISKLABEL_MSGS, which causes disklabel() to return '1' as msg rather than a string. Can be used if the boot blocks don't care about the string, and need to save the space. add support for the preprocessor macro LIBSA_SINGLE_FILESYSTEM, which if defined causes all of the file system switch code to be removed. Its value should be the name of the file system supported by the boot block, e.g. "ufs" for the FFS file system. calls to the file system functions open, close, etc., which were previously done through a function switch are then done via direct invocation of <fs>_open, <fs>_close, etc. (e.g. ufs_open, ...). add support for the preprocessor macro LIBSA_SINGLE_DEVICE, which does the equivalent of LIBSA_SINGLE_FILESYSTEM but for the device switch table. Device entry pointes are expected to be named <dev>foo, e.g. the 'strategy' routine used when LIBSA_SINGLE_DEVICE is set to 'disk' is diskstrategy. make ufs.c f_nindir array be unsigned ints. the fact that it was signed caused ufs.c to require signed division routines (which were otherwise unnecessary for a small boot block).
1999-03-26Changes to compile the next68k bootblocks withdbj
egcs -Wpointer-arith -Wstrict-prototypes This closes pr 6653
1999-02-11Add missing prototypes.pk
1997-06-26Avoid user space headers for standalone programs.drochner
Don't use sys/lib/libkern or sys/lib/libz if not standalone (ie, user space test programs).
1997-06-13-Wall fixesdrochner
1997-01-24isonum_722 and isonum_732 are now back in iso.hcgd
1997-01-24update for iso.h changes which remove the need for the nastiness that was herecgd
1996-09-30Add support for booting from cd9660 fsws
Support directory traversal and symbolic links for nfs booting Close device when file opening failed Plug memory leak in ufs code