From 5a5318473e00aa854d00573abba1725af7b140dd Mon Sep 17 00:00:00 2001 From: Jacob Moody Date: Sat, 20 Aug 2022 02:41:10 +0000 Subject: rio: /dev/label should just ignore offset We were erroring if offset != 0. Just ignore the offset. --- sys/src/cmd/rio/xfid.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sys/src') diff --git a/sys/src/cmd/rio/xfid.c b/sys/src/cmd/rio/xfid.c index 1b7ce9db9..ee142a2e9 100644 --- a/sys/src/cmd/rio/xfid.c +++ b/sys/src/cmd/rio/xfid.c @@ -376,7 +376,7 @@ void xfidwrite(Xfid *x) { Fcall fc; - int cnt, qid, nb, off, nr; + int cnt, qid, nb, nr; char err[ERRMAX], *p, *e; Point pt; Window *w; @@ -393,7 +393,6 @@ xfidwrite(Xfid *x) } qid = FILE(x->f->qid); cnt = x->count; - off = x->offset; x->data[cnt] = 0; switch(qid){ case Qcons: @@ -494,10 +493,6 @@ xfidwrite(Xfid *x) break; case Qlabel: - if(off != 0){ - filsysrespond(x->fs, x, &fc, "non-zero offset writing label"); - return; - } p = realloc(w->label, cnt+1); if(p == nil){ filsysrespond(x->fs, x, &fc, Enomem); -- cgit v1.2.3