Date: Thu, 10 Jan 2002 15:52:17 +0000 (GMT) From: Henry Whincup <henry@techiebod.com> To: "hackers@freebsd.org" <hackers@freebsd.org> Subject: Hacking dump problems Message-ID: <20020110153327.X60043-300000@gw1.techiebod.com>
next in thread | raw e-mail | index | archive | help
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --0-1548065457-1010676893=:60043 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-ID: <20020110153458.O60043@gw1.techiebod.com> I am trying to extend dump to allow a script to be run in order to use an autoloader. The hack^H^H^H^Hdiff is in it's early stages but I feel like I have done enough to make the basic functionality work ;) Diff against RELENG_4 and the script is attached. Basically the idea was to replace the query() calls with calls to a script if a flag (-l) is passed to dump. When I try this without the (-a) append option all works as expected. When dump feels it has got to the end of the tape it calls my script and this successfully changes the tape (verified by looking at the LCD display and using chio stat). However when the (-a) append option is passed the first tape is loaded (assuming no tape in the drive) and written to till the end, the script is then called and successfully changes the tape, however when dump tries to write to the new tape I get the error: DUMP: End of tape detected When I do an mt stat I noticed that the fsf goes up by one for each tape (seems sensible) but other than that I see no other problems. I have added an mt rew and mt stat to the script but see no difference and no new clues. Am I being terminally dull? ;) Can someone with more of a clue about tapes/dump/scsi help? Can I provide more info? Henry PS: Yes I know that the script keeping state is stupid I will fix this once I have fixed the current more blatant issue! PPS: Is anyone else interested in adding per file software compression capability to dump? I would like to do it, but would like someone to bounce ideas off. --0-1548065457-1010676893=:60043 Content-Type: TEXT/PLAIN; charset=us-ascii; name=diff Content-Transfer-Encoding: BASE64 Content-ID: <20020110153453.H60043@gw1.techiebod.com> Content-Description: diff Content-Disposition: attachment; filename=diff SW5kZXg6IG1haW4uYw0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KUkNTIGZp bGU6IC9mcy9Tb3VyY2UvRkJTRC1yZXBvcy9zcmMvc2Jpbi9k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GFwZSk7DQorCQkJCWlmICgh cXVlcnkoIkRvIHlvdSB3YW50IHRvIHJldHJ5IHRoZSBvcGVuPyIpKQ0KKwkJ CQkJZHVtcGFib3J0KDApOw0KKwkJCX0gZWxzZSB7CQkvKiBVc2UgQXV0b2xv YWRlciBzY3JpcHQgKi8NCisJCQkJbXNnKCJDYWxsaW5nICVzIGZvciB2b2x1 bWUgIyVkICglZClcbiIsIExPQURFUlNDUklQVCwgdGFwZW5vKzEsIG5leHR0 YXBlKTsNCisJCQkJcmV0dmFsID0gc3lzdGVtKExPQURFUlNDUklQVCk7DQor CQkJCWlmIChyZXR2YWwgIT0gMCl7DQorCQkJCQltc2coIkVSUk9SOiBMb2Fk ZXIgc2NyaXB0IGZhaWxlZCAocmV0dXJuZWQgJWQpIC0tIEFCT1JUSU5HXG4i LCByZXR2YWwpOw0KKwkJCQkJZHVtcGFib3J0KDApOw0KKwkJCQl9DQorCQkJ fQ0KIAkJfQ0KIA0KIAkJZW5zbGF2ZSgpOyAgLyogU2hhcmUgb3BlbiB0YXBl IGZpbGUgZGVzY3JpcHRvciB3aXRoIHNsYXZlcyAqLw0K --0-1548065457-1010676893=:60043 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="loaderscript.sh" Content-Transfer-Encoding: BASE64 Content-ID: <20020110155217.P60043@gw1.techiebod.com> Content-Description: loaderscript.sh Content-Disposition: attachment; filename="loaderscript.sh" IyEvdXNyL2xvY2FsL2Jpbi96c2gNCg0KVEFQRUZJTEU9L3RtcC9kdW1wdGFw ZQ0KQ0hJT0NNRD0icnNoIGRldiBjaGlvIG1vdmUiDQpNVFJFV0NNRD0icnNo IGRldiBtdCByZXciDQoNCmlmIFsgISAtZSAkVEFQRUZJTEUgXTsgdGhlbg0K CVRBUEVOTz0wDQplbHNlDQoJVEFQRU5PPWBjYXQgJFRBUEVGSUxFYA0KCWVj aG8gTW92aW5nIHRhcGUgJFRBUEVOTyBmcm9tIGRyaXZlIGludG8gc2xvdA0K CWV2YWwgJENISU9DTUQgZHJpdmUgMCBzbG90ICRUQVBFTk8NCglUQVBFTk89 JFsgJFRBUEVOTyArIDFdDQpmaQ0KDQppZiBbICRUQVBFTk8gLWd0IDcgXTsg dGhlbg0KCWVjaG8gTm8gbW9yZSB0YXBlcyBpbiBkZXZpY2UNCglleGl0IDEN CmZpDQoNCmVjaG8gLW4gJFRBUEVOTyA+ICRUQVBFRklMRQ0KZWNobyBNb3Zp bmcgdGFwZSAkVEFQRU5PIGZyb20gc2xvdCB0byBkcml2ZQ0KZXZhbCAkQ0hJ T0NNRCBzbG90ICRUQVBFTk8gZHJpdmUgMA0KZWNobyBSZXdpbmRpbmcgdGFw ZSAkVEFQRU5PDQpldmFsICRNVFJFVw0KZWNobyBTdGF0aW5nIHRhcGUgZGV2 aWNlDQpldmFsIHJzaCBkZXYgbXQgc3RhdA0K --0-1548065457-1010676893=:60043-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020110153327.X60043-300000>