diff --git a/ChangeLog b/ChangeLog index c50b6274c..985b1997b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,41 @@ +1999-09-30 OKUJI Yoshinori + + From Pavel Roskin: + * stage2/defs.h (time_t): Renamed to ... + (mach_time_t): ... this. + (daddr_t): Renamed to ... + (mach_daddr_t): ... this. + (uid_t): Renamed to ... + (mach_uid_t): ... this. + (gid_t): Renamed to ... + (mach_gid_t): ... this. + (ino_t): Renamed to ... + (mach_ino_t): ... this. + * stage2/disk_inode.h (FFS_MAX_FASTLINK_SIZE): Use mach_daddr_t + instead of daddr_t. + (struct icommon): Use mach_uid_t, mach_gid_t, mach_time_t and + mach_daddr_t, instead of uid_t, gid_t, time_t and daddr_t. + * stage2/fs.h (BBLOCK): Use mach_daddr_t instead of addr_t. + (SBLOCK): Likewise. + (ROOTINO): Use mach_ino_t instead of ino_t. + (struct fs): Use mach_daddr_t and mach_time_t instead of daddr_t + and time_t. + (struct cg): Use mach_time_t instead of time_t. + (struct ocg): Likewise. + (cgbase): Use mach_daddr_t instead of daddr_t. + (itod): Likewise. + +1999-09-30 OKUJI Yoshinori + + * acinclude.m4 (grub_CHECK_START_SYMBOL): Use AC_TRY_LINK + instead of AC_TRY_COMMAND. + (grub_CHECK_USCORE_START_SYMBOL): Likewise. + (grub_CHECK_END_SYMBOL): Likewise. + (grub_CHECK_USCORE_END_SYMBOL): Likewise. + + * stage2/disk_io.c (set_device) [!STAGE1_5]: Use RESULT instead + of RETVAL to check if the analysis succeeds. + 1999-09-29 OKUJI Yoshinori * stage2/builtins.c (install_func): If the Stage 2 id in FILE is diff --git a/acinclude.m4 b/acinclude.m4 index 0c42e1224..175d73279 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -159,22 +159,9 @@ AC_DEFUN(grub_CHECK_START_SYMBOL, [AC_REQUIRE([AC_PROG_CC]) AC_MSG_CHECKING([if start is defined by the compiler]) AC_CACHE_VAL(grub_cv_check_start_symbol, -[cat > conftest.c <<\EOF -int -main (void) -{ - asm ("incl start"); - return 0; -} -EOF - -if AC_TRY_COMMAND([${CC-cc} conftest.c -o conftest]) && test -s conftest; then - grub_cv_check_start_symbol=yes -else - grub_cv_check_start_symbol=no -fi - -rm -f conftest*]) +[AC_TRY_LINK([], [asm ("incl start")], + grub_cv_check_start_symbol=yes, + grub_cv_check_start_symbol=no)]) if test "x$grub_cv_check_start_symbol" = xyes; then AC_DEFINE([HAVE_START_SYMBOL]) @@ -191,22 +178,9 @@ AC_DEFUN(grub_CHECK_USCORE_START_SYMBOL, [AC_REQUIRE([AC_PROG_CC]) AC_MSG_CHECKING([if _start is defined by the compiler]) AC_CACHE_VAL(grub_cv_check_uscore_start_symbol, -[cat > conftest.c <<\EOF -int -main (void) -{ - asm ("incl _start"); - return 0; -} -EOF - -if AC_TRY_COMMAND([${CC-cc} conftest.c -o conftest]) && test -s conftest; then - grub_cv_check_uscore_start_symbol=yes -else - grub_cv_check_uscore_start_symbol=no -fi - -rm -f conftest*]) +[AC_TRY_LINK([], [asm ("incl _start")], + grub_cv_check_uscore_start_symbol=yes, + grub_cv_check_uscore_start_symbol=no)]) if test "x$grub_cv_check_uscore_start_symbol" = xyes; then AC_DEFINE([HAVE_USCORE_START_SYMBOL]) @@ -223,22 +197,9 @@ AC_DEFUN(grub_CHECK_END_SYMBOL, [AC_REQUIRE([AC_PROG_CC]) AC_MSG_CHECKING([if end is defined by the compiler]) AC_CACHE_VAL(grub_cv_check_end_symbol, -[cat > conftest.c <<\EOF -int -main (void) -{ - asm ("incl end"); - return 0; -} -EOF - -if AC_TRY_COMMAND([${CC-cc} conftest.c -o conftest]) && test -s conftest; then - grub_cv_check_end_symbol=yes -else - grub_cv_check_end_symbol=no -fi - -rm -f conftest*]) +[AC_TRY_LINK([], [asm ("incl end")], + grub_cv_check_end_symbol=yes, + grub_cv_check_end_symbol=no)]) if test "x$grub_cv_check_end_symbol" = xyes; then AC_DEFINE([HAVE_END_SYMBOL]) @@ -255,22 +216,9 @@ AC_DEFUN(grub_CHECK_USCORE_END_SYMBOL, [AC_REQUIRE([AC_PROG_CC]) AC_MSG_CHECKING([if _end is defined by the compiler]) AC_CACHE_VAL(grub_cv_check_uscore_end_symbol, -[cat > conftest.c <<\EOF -int -main (void) -{ - asm ("incl _end"); - return 0; -} -EOF - -if AC_TRY_COMMAND([${CC-cc} conftest.c -o conftest]) && test -s conftest; then - grub_cv_check_uscore_end_symbol=yes -else - grub_cv_check_uscore_end_symbol=no -fi - -rm -f conftest*]) +[AC_TRY_LINK([], [asm ("incl _end")], + grub_cv_check_uscore_end_symbol=yes, + grub_cv_check_uscore_end_symbol=no)]) if test "x$grub_cv_check_uscore_end_symbol" = xyes; then AC_DEFINE([HAVE_USCORE_END_SYMBOL]) diff --git a/aclocal.m4 b/aclocal.m4 index b2dd414b8..f0997df92 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -171,22 +171,9 @@ AC_DEFUN(grub_CHECK_START_SYMBOL, [AC_REQUIRE([AC_PROG_CC]) AC_MSG_CHECKING([if start is defined by the compiler]) AC_CACHE_VAL(grub_cv_check_start_symbol, -[cat > conftest.c <<\EOF -int -main (void) -{ - asm ("incl start"); - return 0; -} -EOF - -if AC_TRY_COMMAND([${CC-cc} conftest.c -o conftest]) && test -s conftest; then - grub_cv_check_start_symbol=yes -else - grub_cv_check_start_symbol=no -fi - -rm -f conftest*]) +[AC_TRY_LINK([], [asm ("incl start")], + grub_cv_check_start_symbol=yes, + grub_cv_check_start_symbol=no)]) if test "x$grub_cv_check_start_symbol" = xyes; then AC_DEFINE([HAVE_START_SYMBOL]) @@ -203,22 +190,9 @@ AC_DEFUN(grub_CHECK_USCORE_START_SYMBOL, [AC_REQUIRE([AC_PROG_CC]) AC_MSG_CHECKING([if _start is defined by the compiler]) AC_CACHE_VAL(grub_cv_check_uscore_start_symbol, -[cat > conftest.c <<\EOF -int -main (void) -{ - asm ("incl _start"); - return 0; -} -EOF - -if AC_TRY_COMMAND([${CC-cc} conftest.c -o conftest]) && test -s conftest; then - grub_cv_check_uscore_start_symbol=yes -else - grub_cv_check_uscore_start_symbol=no -fi - -rm -f conftest*]) +[AC_TRY_LINK([], [asm ("incl _start")], + grub_cv_check_uscore_start_symbol=yes, + grub_cv_check_uscore_start_symbol=no)]) if test "x$grub_cv_check_uscore_start_symbol" = xyes; then AC_DEFINE([HAVE_USCORE_START_SYMBOL]) @@ -235,22 +209,9 @@ AC_DEFUN(grub_CHECK_END_SYMBOL, [AC_REQUIRE([AC_PROG_CC]) AC_MSG_CHECKING([if end is defined by the compiler]) AC_CACHE_VAL(grub_cv_check_end_symbol, -[cat > conftest.c <<\EOF -int -main (void) -{ - asm ("incl end"); - return 0; -} -EOF - -if AC_TRY_COMMAND([${CC-cc} conftest.c -o conftest]) && test -s conftest; then - grub_cv_check_end_symbol=yes -else - grub_cv_check_end_symbol=no -fi - -rm -f conftest*]) +[AC_TRY_LINK([], [asm ("incl end")], + grub_cv_check_end_symbol=yes, + grub_cv_check_end_symbol=no)]) if test "x$grub_cv_check_end_symbol" = xyes; then AC_DEFINE([HAVE_END_SYMBOL]) @@ -267,22 +228,9 @@ AC_DEFUN(grub_CHECK_USCORE_END_SYMBOL, [AC_REQUIRE([AC_PROG_CC]) AC_MSG_CHECKING([if _end is defined by the compiler]) AC_CACHE_VAL(grub_cv_check_uscore_end_symbol, -[cat > conftest.c <<\EOF -int -main (void) -{ - asm ("incl _end"); - return 0; -} -EOF - -if AC_TRY_COMMAND([${CC-cc} conftest.c -o conftest]) && test -s conftest; then - grub_cv_check_uscore_end_symbol=yes -else - grub_cv_check_uscore_end_symbol=no -fi - -rm -f conftest*]) +[AC_TRY_LINK([], [asm ("incl _end")], + grub_cv_check_uscore_end_symbol=yes, + grub_cv_check_uscore_end_symbol=no)]) if test "x$grub_cv_check_uscore_end_symbol" = xyes; then AC_DEFINE([HAVE_USCORE_END_SYMBOL]) diff --git a/configure b/configure index c2e61ac3c..54911504a 100644 --- a/configure +++ b/configure @@ -1643,21 +1643,23 @@ echo "configure:1643: checking if start is defined by the compiler" >&5 if eval "test \"\${grub_cv_check_start_symbol+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.c <<\EOF -int -main (void) -{ - asm ("incl start"); - return 0; -} -EOF + cat > conftest.$ac_ext <&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then +int main() { +asm ("incl start") +; return 0; } +EOF +if { (eval echo configure:1655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* grub_cv_check_start_symbol=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* grub_cv_check_start_symbol=no fi - rm -f conftest* fi @@ -1673,25 +1675,27 @@ echo "$ac_t""$grub_cv_check_start_symbol" 1>&6 echo $ac_n "checking if _start is defined by the compiler""... $ac_c" 1>&6 -echo "configure:1677: checking if _start is defined by the compiler" >&5 +echo "configure:1679: checking if _start is defined by the compiler" >&5 if eval "test \"\${grub_cv_check_uscore_start_symbol+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.c <<\EOF -int -main (void) -{ - asm ("incl _start"); - return 0; -} -EOF + cat > conftest.$ac_ext <&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then +int main() { +asm ("incl _start") +; return 0; } +EOF +if { (eval echo configure:1691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* grub_cv_check_uscore_start_symbol=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* grub_cv_check_uscore_start_symbol=no fi - rm -f conftest* fi @@ -1712,25 +1716,27 @@ fi echo $ac_n "checking if end is defined by the compiler""... $ac_c" 1>&6 -echo "configure:1716: checking if end is defined by the compiler" >&5 +echo "configure:1720: checking if end is defined by the compiler" >&5 if eval "test \"\${grub_cv_check_end_symbol+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.c <<\EOF -int -main (void) -{ - asm ("incl end"); - return 0; -} -EOF + cat > conftest.$ac_ext <&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then +int main() { +asm ("incl end") +; return 0; } +EOF +if { (eval echo configure:1732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* grub_cv_check_end_symbol=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* grub_cv_check_end_symbol=no fi - rm -f conftest* fi @@ -1746,25 +1752,27 @@ echo "$ac_t""$grub_cv_check_end_symbol" 1>&6 echo $ac_n "checking if _end is defined by the compiler""... $ac_c" 1>&6 -echo "configure:1750: checking if _end is defined by the compiler" >&5 +echo "configure:1756: checking if _end is defined by the compiler" >&5 if eval "test \"\${grub_cv_check_uscore_end_symbol+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.c <<\EOF -int -main (void) -{ - asm ("incl _end"); - return 0; -} -EOF + cat > conftest.$ac_ext <&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then +int main() { +asm ("incl _end") +; return 0; } +EOF +if { (eval echo configure:1768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* grub_cv_check_uscore_end_symbol=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* grub_cv_check_uscore_end_symbol=no fi - rm -f conftest* fi @@ -1785,7 +1793,7 @@ fi # Check for curses libraries. echo $ac_n "checking for wgetch in -lncurses""... $ac_c" 1>&6 -echo "configure:1789: checking for wgetch in -lncurses" >&5 +echo "configure:1797: checking for wgetch in -lncurses" >&5 ac_lib_var=`echo ncurses'_'wgetch | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1793,7 +1801,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1827,7 +1835,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for wgetch in -lcurses""... $ac_c" 1>&6 -echo "configure:1831: checking for wgetch in -lcurses" >&5 +echo "configure:1839: checking for wgetch in -lcurses" >&5 ac_lib_var=`echo curses'_'wgetch | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1835,7 +1843,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1876,7 +1884,7 @@ fi # Check for headers. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1880: checking how to run the C preprocessor" >&5 +echo "configure:1888: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1891,13 +1899,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1908,13 +1916,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1925,13 +1933,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1959,17 +1967,17 @@ for ac_hdr in string.h strings.h ncurses/curses.h ncurses.h curses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1963: checking for $ac_hdr" >&5 +echo "configure:1971: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* diff --git a/stage2/defs.h b/stage2/defs.h index a5e545352..f2f26831b 100644 --- a/stage2/defs.h +++ b/stage2/defs.h @@ -56,13 +56,13 @@ typedef struct _quad_ } quad; /* an 8-byte item */ -typedef unsigned int time_t; /* an unsigned int */ -typedef unsigned int daddr_t; /* an unsigned int */ +typedef unsigned int mach_time_t; /* an unsigned int */ +typedef unsigned int mach_daddr_t; /* an unsigned int */ typedef unsigned int mach_off_t; /* another unsigned int */ -typedef unsigned short uid_t; -typedef unsigned short gid_t; -typedef unsigned int ino_t; +typedef unsigned short mach_uid_t; +typedef unsigned short mach_gid_t; +typedef unsigned int mach_ino_t; #define NBBY 8 diff --git a/stage2/disk_inode.h b/stage2/disk_inode.h index d9c2e23ae..2103cb86a 100644 --- a/stage2/disk_inode.h +++ b/stage2/disk_inode.h @@ -56,27 +56,28 @@ #define FFS_NDADDR 12 /* direct addresses in inode */ #define FFS_NIADDR 3 /* indirect addresses in inode */ -#define FFS_MAX_FASTLINK_SIZE ((FFS_NDADDR + FFS_NIADDR) * sizeof(daddr_t)) +#define FFS_MAX_FASTLINK_SIZE ((FFS_NDADDR + FFS_NIADDR) \ + * sizeof (mach_daddr_t)) struct icommon { u_short ic_mode; /* 0: mode and type of file */ short ic_nlink; /* 2: number of links to file */ - uid_t ic_uid; /* 4: owner's user id */ - gid_t ic_gid; /* 6: owner's group id */ + mach_uid_t ic_uid; /* 4: owner's user id */ + mach_gid_t ic_gid; /* 6: owner's group id */ quad ic_size; /* 8: number of bytes in file */ - time_t ic_atime; /* 16: time last accessed */ + mach_time_t ic_atime; /* 16: time last accessed */ int ic_atspare; - time_t ic_mtime; /* 24: time last modified */ + mach_time_t ic_mtime; /* 24: time last modified */ int ic_mtspare; - time_t ic_ctime; /* 32: last time inode changed */ + mach_time_t ic_ctime; /* 32: last time inode changed */ int ic_ctspare; union { struct { - daddr_t Mb_db[FFS_NDADDR]; /* 40: disk block addresses */ - daddr_t Mb_ib[FFS_NIADDR]; /* 88: indirect blocks */ + mach_daddr_t Mb_db[FFS_NDADDR]; /* 40: disk block addresses */ + mach_daddr_t Mb_ib[FFS_NIADDR]; /* 88: indirect blocks */ } ic_Mb; char ic_Msymlink[FFS_MAX_FASTLINK_SIZE]; diff --git a/stage2/disk_io.c b/stage2/disk_io.c index e809b00f1..70b7fa35d 100644 --- a/stage2/disk_io.c +++ b/stage2/disk_io.c @@ -698,8 +698,7 @@ set_device (char *device) #else /* ! STAGE1_5 */ - /* The use of retval in this function is not really clean, but it works */ - char *retval = 0; + int result = 0; incomplete = 0; disk_choice = 1; @@ -754,7 +753,7 @@ set_device (char *device) if (*device == ')') { part_choice = PART_CHOSEN; - retval++; + result = 1; } else if (*device == ',') { @@ -800,7 +799,7 @@ set_device (char *device) part_choice ++; } - retval++; + result = 1; } } } @@ -826,7 +825,7 @@ set_device (char *device) if (*device == '/') { part_choice = PART_CHOSEN; - retval ++; + result = 1; } else if (*device == 's') { @@ -873,15 +872,15 @@ set_device (char *device) part_choice ++; } - retval ++; + result = 1; } } if (! sane_partition ()) return 0; - if (retval) - retval = device + 1; + if (result) + return device + 1; else { if (!*device) @@ -889,7 +888,7 @@ set_device (char *device) errnum = ERR_DEV_FORMAT; } - return retval; + return 0; #endif /* ! STAGE1_5 */ } diff --git a/stage2/fs.h b/stage2/fs.h index 6ce26ee58..8ed4fe041 100644 --- a/stage2/fs.h +++ b/stage2/fs.h @@ -70,8 +70,8 @@ #define SBSIZE 8192 #define BBOFF ((mach_off_t)(0)) #define SBOFF ((mach_off_t)(BBOFF + BBSIZE)) -#define BBLOCK ((daddr_t)(0)) -#define SBLOCK ((daddr_t)(BBLOCK + BBSIZE / DEV_BSIZE)) +#define BBLOCK ((mach_daddr_t)(0)) +#define SBLOCK ((mach_daddr_t)(BBLOCK + BBSIZE / DEV_BSIZE)) /* * Addresses stored in inodes are capable of addressing fragments @@ -98,7 +98,7 @@ * this purpose, however numerous dump tapes make this * assumption, so we are stuck with it) */ -#define ROOTINO ((ino_t)2) /* i number of all roots */ +#define ROOTINO ((mach_ino_t)2) /* i number of all roots */ /* * MINBSIZE is the smallest allowable block size. @@ -147,13 +147,13 @@ struct fs { int xxx1; /* struct fs *fs_link; */ int xxx2; /* struct fs *fs_rlink; */ - daddr_t fs_sblkno; /* addr of super-block in filesys */ - daddr_t fs_cblkno; /* offset of cyl-block in filesys */ - daddr_t fs_iblkno; /* offset of inode-blocks in filesys */ - daddr_t fs_dblkno; /* offset of first data after cg */ + mach_daddr_t fs_sblkno; /* addr of super-block in filesys */ + mach_daddr_t fs_cblkno; /* offset of cyl-block in filesys */ + mach_daddr_t fs_iblkno; /* offset of inode-blocks in filesys */ + mach_daddr_t fs_dblkno; /* offset of first data after cg */ int fs_cgoffset; /* cylinder group offset in cylinder */ int fs_cgmask; /* used to calc mod fs_ntrak */ - time_t fs_time; /* last time written */ + mach_time_t fs_time; /* last time written */ int fs_size; /* number of blocks in fs */ int fs_dsize; /* number of data blocks in fs */ int fs_ncg; /* number of cylinder groups */ @@ -190,7 +190,7 @@ struct fs int fs_headswitch; /* head switch time, usec */ int fs_trkseek; /* track-to-track seek, usec */ /* sizes determined by number of cylinder groups and their sizes */ - daddr_t fs_csaddr; /* blk addr of cyl grp summary area */ + mach_daddr_t fs_csaddr; /* blk addr of cyl grp summary area */ int fs_cssize; /* size of cyl grp summary area */ int fs_cgsize; /* cylinder group size */ /* these fields are derived from the hardware */ @@ -275,7 +275,7 @@ struct cg { int xxx1; /* struct cg *cg_link; */ int cg_magic; /* magic number */ - time_t cg_time; /* time last written */ + mach_time_t cg_time; /* time last written */ int cg_cgx; /* we are the cgx'th cylinder group */ short cg_ncyl; /* number of cyl's this cg */ short cg_niblk; /* number of inode blocks this cg */ @@ -324,7 +324,7 @@ struct ocg { int xxx1; /* struct ocg *cg_link; */ int xxx2; /* struct ocg *cg_rlink; */ - time_t cg_time; /* time last written */ + mach_time_t cg_time; /* time last written */ int cg_cgx; /* we are the cgx'th cylinder group */ short cg_ncyl; /* number of cyl's this cg */ short cg_niblk; /* number of inode blocks this cg */ @@ -353,7 +353,7 @@ struct ocg * Cylinder group macros to locate things in cylinder groups. * They calc file system addresses of cylinder group data structures. */ -#define cgbase(fs, c) ((daddr_t)((fs)->fs_fpg * (c))) +#define cgbase(fs, c) ((mach_daddr_t)((fs)->fs_fpg * (c))) #define cgstart(fs, c) \ (cgbase(fs, c) + (fs)->fs_cgoffset * ((c) & ~((fs)->fs_cgmask))) #define cgsblock(fs, c) (cgstart(fs, c) + (fs)->fs_sblkno) /* super blk */ @@ -370,7 +370,7 @@ struct ocg #define itoo(fs, x) ((x) % INOPB(fs)) #define itog(fs, x) ((x) / (fs)->fs_ipg) #define itod(fs, x) \ - ((daddr_t)(cgimin(fs, itog(fs, x)) + \ + ((mach_daddr_t)(cgimin(fs, itog(fs, x)) + \ (blkstofrags((fs), (((x) % (fs)->fs_ipg) / INOPB(fs)))))) /*