shithub: unionfs

Download patch

ref: 9387cf4ce05bb087ab655fc57466b3e861c58c16
parent: 80bc3e7fd1a4ae229d9cdedff9e044080c0e5e04
author: kvik <kvik@a-b.xyz>
date: Tue Apr 23 10:42:14 EDT 2019

determine and return the iounit for the open file

--- a/unionfs.c
+++ b/unionfs.c
@@ -446,13 +446,15 @@
 void
 fsopen(Req *r)
 {
-	Fcall *i;
+	Fcall *i, *o;
 	Fstate *st;
 	Fil *f;
 	
 	i = &r->ifcall;
+	o = &r->ofcall;
 	st = r->fid->aux;
 	f = st->file;
+
 	if(f->mode&DMDIR){
 		st->dir = filereaddir(f);
 		st->idx = st->dir;
@@ -462,6 +464,7 @@
 			responderror(r);
 			return;
 		}
+		o->iounit = iounit(st->fd);
 	}
 	respond(r, nil);
 }