Pure Erlang implementation of 9p2000 protocol
filesystem fs 9p2000 erlang 9p

Fix map merge order in stat encoding

hauleth.dev 7c355cef 03d53e06

verified
+22 -3
+3 -1
nix/kamid/default.nix
··· 25 25 bison 26 26 ]; 27 27 28 - patches = lib.optionals stdenv.isDarwin [ ./macos.patch ]; 28 + patches = lib.optionals stdenv.isDarwin [ 29 + ./macos.patch 30 + ]; 29 31 30 32 meta.package.platforms = old.meta.package.platforms ++ [ 31 33 "aarch64-darwin"
+18
nix/kamid/mode_format.patch
··· 1 + diff --git i/kamiftp/ftp.c w/kamiftp/ftp.c 2 + index f776ea7..8119db0 100644 3 + --- i/kamiftp/ftp.c 4 + +++ w/kamiftp/ftp.c 5 + @@ -1005,9 +1005,10 @@ print_dirent(const struct np_stat *st) 6 + printf("d"); 7 + else 8 + printf("-"); 9 + - printf("%s", pp_perm(st->mode >> 6)); 10 + - printf("%s", pp_perm(st->mode >> 3)); 11 + - printf("%s", pp_perm(st->mode)); 12 + + printf("%o", st->mode); 13 + + // printf("%s", pp_perm(st->mode >> 6)); 14 + + // printf("%s", pp_perm(st->mode >> 3)); 15 + + // printf("%s", pp_perm(st->mode)); 16 + printf(" %8s %12s %s%s\n", fmt, tim, st->name, 17 + st->qid.type & QTDIR ? "/" : ""); 18 +
+1 -2
src/e9p_msg.erl
··· 288 288 gid := Gid, 289 289 muid := MUid 290 290 } = maps:merge( 291 - Stat, 292 291 #{ 293 292 type => 0, 294 293 dev => 0, ··· 298 297 uid => ~"", 299 298 gid => ~"", 300 299 muid => ~"" 301 - }), 300 + }, Stat), 302 301 Encoded = [<< 303 302 Type:2/?int, 304 303 Dev:4/?int