home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!Sirius.dfn.de!chx400!josef!kluge
- From: kluge@avalon.physik.unizh.ch (kluge daniel)
- Newsgroups: comp.sys.next.misc
- Subject: Re: how to read a (ie: 'tar') floppy?!?
- Message-ID: <1993Jan6.114733.21118@ifi.unizh.ch>
- Date: 6 Jan 93 11:47:33 GMT
- References: <1993Jan6.060123.3560@netcom.com>
- Sender: news@ifi.unizh.ch (USENET News Admin)
- Organization: University of Zurich, Department of Computer Science
- Lines: 42
- Nntp-Posting-Host: avalon
- X-Newsreader: TIN [version 1.1 PL8]
-
- Gordie Freedman (gordie@cyclesoft.com) wrote:
-
- : -------------cut for eject.m-----------------
- : #include <stdio.h>
- : #include <sys/file.h>
- : #include <bsd/dev/disk.h>
- : #include <bsd/dev/fd_extern.h>
-
- : // save this file as eject.m
- : // % make eject # Make a binary (no makefile required)
- : // % strip ./eject # Shrink the binary
- : // % ./eject # to eject the disk
- : // As long as /dev/rfd0b is crw-rw-rw- this will work, else
- : // run this program as root.
-
- : void
- : main (int argc, char** argv)
- : {
- : int fd = open ("/dev/rfd0b", O_RDONLY, 0);
- : ioctl (fd, DKIOCEJECT);
- : close (fd);
- : exit (0);
- : }
-
- : -----------------end eject.m-------------
- : --
-
- Ok, the command is disk -e <raw-device>
- We use the following script:
-
- #!/bin/sh
- /usr/etc/disk -e /dev/rfd${1:-0}b
-
- : --- Gordie Freedman gordie@cyclesoft.com NeXTMail Yes! ---
- : >>> Thou shalt not inline functions more complicated than 20
-
- - daniel
- --
- Daniel G. Kluge @ Swiss Federal Institute of Technology Zuerich
- E-Mail : kluge@avalon.physik.unizh.ch (NeXT-Mail welcome)
- study-related stuff : dankluge@iiic.ethz.ch
- DECnet : EZINFO::CLUESCH
-