†††
†
†
†††
†
_init() { int err; err = mod_install(&modlinkage); ^^^^^^^^^^^^^^^^^^^^^^^^^ return (err); }
| | | | | | | | ... | | | |
err = vfs_setfsops(fstype, iumfs_vfs_ops_def_array, &iumfs_vfsops); ~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~
†
†
iumfs_mount.c main(int argc, char *argv[]) { if (argc != 3){ printf("Usage: %s -F iumfs strings mount_point\n", argv[0]); exit(0); } if ( mount(argv[1], argv[2], MS_DATA, "iumfs", NULL, 0) < 0 ){ perror("mount"); exit(0); } return(0); }
††
$ ./configure checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for a BSD-compatible install... /bin/ginstall -c checking for isainfo... yes configure: creating ./config.status config.status: creating Makefile # make gcc -c -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -g -O2 -Wall -DOPENSOLARIS -DSOL10 -m64 -mcmodel=kernel -mno-red-zone -D_KERNEL -I. iumfs.c -o iumfs.o gcc -c -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -g -O2 -Wall -DOPENSOLARIS -DSOL10 -m64 -mcmodel=kernel -mno-red-zone -D_KERNEL -I. iumfs_vnode.c -o iumfs_vnode.o ld -dn -r iumfs.o iumfs_vnode.o -o iumfs gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -g -O2 -Wall -DOPENSOLARIS -DSOL10 -m64 iumfs_mount.c -o mount gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -g -O2 -Wall -DOPENSOLARIS -DSOL10 -m64 fstest.c -o fstest # make install /bin/ginstall -c -m 0644 -o root -g sys iumfs /kernel/fs/amd64 /usr/sbin/modload iumfs /bin/ginstall -c -d -m 0755 -o root -g bin /usr/lib/fs/iumfs /bin/ginstall -c -m 0755 -o root -g bin mount /usr/lib/fs/iumfs †# make uninstall /usr/sbin/modunload -i `modinfo |grep iumfs | awk '{print }'` rm /kernel/fs/amd64/iumfs rm /usr/lib/fs/iumfs/mount rm -rf /usr/lib/fs/iumfs
# make uninstall /usr/sbin/modunload -i `modinfo |grep iumfs | awk '{print }'` can't unload the module: Device busy *** Error code 16 (ignored) rm /kernel/fs/amd64/iumfs rm /usr/lib/fs/iumfs/mount rm -rf /usr/lib/fs/iumfs ††Usage: mount -F iumfs strings mount_point # /usr/sbin/mount -F iumfs hoge /mnt # # mount ... ... /mnt on hoge read/write/setuid/devices/dev=ffffffff on Thu Nov 10 00:20:14 2005 ^^^^ †
# cd /mnt # ls -lai # echo "sample text" > file.txt # mkdir dir # ls -lai # cat file.txt sample text # rm file.txt # rm -r dir # ls -lia # cp /etc/motd /mnt # ls -lai # cat motd Sun Microsystems Inc. SunOS 5.10 Generic January 2005 †
# cd /mnt # touch file.txt # ls -li file.txt # chmod 777 file.txt # ls -li file.txt # touch file.txt # ls -li file.txt # chown nobody file.txt # †Usage: umount mount_point
# umount /mnt # # pwd /mnt # umount /mnt
† |