OK, turing.

<- leave blank

Wed Jul 21 18:34:58 EDT 2021

18:08 < cinap_lenrek> like have 0 indirection
18:08 < cinap_lenrek> and have a flag in the direntry
18:08 < cinap_lenrek> and then store data *IN* the direntry itself
18:09 < cinap_lenrek> might work fine if you have a zillion super small
files
18:09 < cinap_lenrek> like a few 100 bytes


Wed Jul 21 15:52:32 EDT 2021
---
//.git/fs/object/60b7d723793dde4afd313241585eeb3bc83b92b0/tree/sys/src/cmd/acme/text.c
+++ sys/src/cmd/acme/text.c
@@ -742,6 +742,8 @@
			error("text.type");
		cut(t, t, nil, TRUE, TRUE, nil, 0);
		t->eq0 = ~0;
+ if(r == 0x08) /* skip the extra erase */
+ return;
	}
	textshow(t, t->q0, t->q0, 1);
	switch(r){


Wed Jul 21 15:51:15 EDT 2021
---
//.git/fs/object/60b7d723793dde4afd313241585eeb3bc83b92b0/tree/sys/src/cmd/acme/text.c
+++ sys/src/cmd/acme/text.c
@@ -742,6 +742,8 @@
			error("text.type");
		cut(t, t, nil, TRUE, TRUE, nil, 0);
		t->eq0 = ~0;
+ if(r == 0x08) /* ^H: erase character */
+ return; /* skip the extra backspace */
	}
	textshow(t, t->q0, t->q0, 1);
	switch(r){


Wed Jul 21 14:52:02 EDT 2021
: purgatorio ; cat dis | syscall -s fstat 0 buf 1024
syscall: return: 71
'data' 'glenda' 'glenda' 'glenda' q (000000000478a201 0 ) m 0600 at 1626893295 mt
1625917349 l 0 t 124 d 0
: purgatorio ; ls -l | grep dis
d-rwxr-xr-x M 3542 joe joe 4096 Jul 21 11:28 dis


Wed Jul 21 13:27:10 EDT 2021
; 9fs 9dump.net
post...
# with minimp3 mp3dec
; play /n/9dump.net/m/mgam/starcraft2wol.zerg4.mp3
/n/9dump.net/m/mgam/starcraft2wol.zerg4.mp3
pcmconv: bad format: s16c0r0
# with /sys/src/cmd/audio/mp3dec
; play /n/9dump.net/m/mgam/starcraft2wol.zerg4.mp3
/n/9dump.net/m/mgam/starcraft2wol.zerg4.mp3
# no error


Wed Jul 21 11:56:12 EDT 2021
---
//.git/fs/object/669b3abd702b934927499d976e563a1d663f9648/tree//sys/src/cmd/ssh.c
+++ /sys/src/cmd/ssh.c
@@ -1270,7 +1270,7 @@
	fprint(fd, "%s\r\n", send.v);
	recv.v = readline();
	if(debug)
- fprint(2, "server verison: %s\n", recv.v);
+ fprint(2, "server version: %s\n", recv.v);
	if(strncmp("SSH-2.0-", recv.v, 8) != 0)
		sysfatal("bad server version: %s", recv.v);
	recv.v = strdup(recv.v);

Wed Jul 21 11:55:26 EDT 2021
term% ssh -d 192.168.88.183
server verison: SSH-2.0-dropbear_2019.78
kexalgs:
curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group14-sha256,kexguess2@matt.ucc.asn.au
hostalgs: ssh-rsa
cipher1: aes128-ctr,aes256-ctr
cipher2: aes128-ctr,aes256-ctr
mac1: hmac-sha1,hmac-sha2-256
mac2: hmac-sha1,hmac-sha2-256
zip1: zlib@openssh.com,none
zip2: zlib@openssh.com,none
lang1:
lang2:
ssh: read1: eof

Wed Jul 21 10:45:18 EDT 2021
---
//.git/fs/object/669b3abd702b934927499d976e563a1d663f9648/tree/sys/src/cmd/gzip/gzip.c
+++ sys/src/cmd/gzip/gzip.c
@@ -4,7 +4,7 @@
 #include <flate.h>
 #include "gzip.h"

-static int gzipf(char*, int);
+static int gzipf(char*, int, int);
 static int gzip(char*, long, int, Biobuf*);
 static int crcread(void *fd, void *buf, int n);
 static int gzwrite(void *bout, void *buf, int n);
@@ -29,9 +29,11 @@
 main(int argc, char *argv[])
 {
	int i, ok, stdout;
+ long mtime;

	level = 6;
	stdout = 0;
+ mtime = time(nil);
	ARGBEGIN{
	case 'D':
		debug++;
@@ -46,6 +48,9 @@
	case '5': case '6': case '7': case '8': case '9':
		level = ARGC() - '0';
		break;
+ case 'n':
+ mtime = 0;
+ break;
	default:
		usage();
		break;
@@ -58,18 +63,18 @@

	if(argc == 0){
		Binit(&bout, 1, OWRITE);
- ok = gzip(nil, time(0), 0, &bout);
+ ok = gzip(nil, mtime, 0, &bout);
		Bterm(&bout);
	}else{
		ok = 1;
		for(i = 0; i < argc; i++)
- ok &= gzipf(argv[i], stdout);
+ ok &= gzipf(argv[i], !mtime, stdout);
	}
	exits(ok ? nil: "errors");
 }

 static int
-gzipf(char *file, int stdout)
+gzipf(char *file, int nomtime, int stdout)
 {
	Dir *dir;
	char ofile[256], *f, *s;
@@ -120,7 +125,7 @@
		fprint(2, "compressing %s to %s\n", file, ofile);

	Binit(&bout, ofd, OWRITE);
- ok = gzip(file, dir->mtime, ifd, &bout);
+ ok = gzip(file, nomtime ? 0 : dir->mtime, ifd, &bout);
	if(!ok || Bflush(&bout) < 0){
		fprint(2, "gzip: error writing %s: %r\n", ofile);
		if(!stdout)


Wed Jul 21 10:44:19 EDT 2021
---
//.git/fs/object/669b3abd702b934927499d976e563a1d663f9648/tree/sys/src/cmd/gzip/gzip.c
+++ sys/src/cmd/gzip/gzip.c
@@ -4,7 +4,7 @@
 #include <flate.h>
 #include "gzip.h"

-static int gzipf(char*, int);
+static int gzipf(char*, int, int);
 static int gzip(char*, long, int, Biobuf*);
 static int crcread(void *fd, void *buf, int n);
 static int gzwrite(void *bout, void *buf, int n);
@@ -29,9 +29,11 @@
 main(int argc, char *argv[])
 {
	int i, ok, stdout;
+ long mtime;

	level = 6;
	stdout = 0;
+ mtime = time(0);
	ARGBEGIN{
	case 'D':
		debug++;
@@ -46,6 +48,9 @@
	case '5': case '6': case '7': case '8': case '9':
		level = ARGC() - '0';
		break;
+ case 'n':
+ mtime = 0;
+ break;
	default:
		usage();
		break;
@@ -58,18 +63,18 @@

	if(argc == 0){
		Binit(&bout, 1, OWRITE);
- ok = gzip(nil, time(0), 0, &bout);
+ ok = gzip(nil, mtime, 0, &bout);
		Bterm(&bout);
	}else{
		ok = 1;
		for(i = 0; i < argc; i++)
- ok &= gzipf(argv[i], stdout);
+ ok &= gzipf(argv[i], !mtime, stdout);
	}
	exits(ok ? nil: "errors");
 }

 static int
-gzipf(char *file, int stdout)
+gzipf(char *file, int nomtime, int stdout)
 {
	Dir *dir;
	char ofile[256], *f, *s;
@@ -120,7 +125,7 @@
		fprint(2, "compressing %s to %s\n", file, ofile);

	Binit(&bout, ofd, OWRITE);
- ok = gzip(file, dir->mtime, ifd, &bout);
+ ok = gzip(file, nomtime?  0 : dir->mtime, ifd, &bout);
	if(!ok || Bflush(&bout) < 0){
		fprint(2, "gzip: error writing %s: %r\n", ofile);
		if(!stdout)


Wed Jul 21 10:38:03 EDT 2021
---
//.git/fs/object/669b3abd702b934927499d976e563a1d663f9648/tree/sys/src/cmd/gzip/gzip.c
+++ sys/src/cmd/gzip/gzip.c
@@ -29,9 +29,11 @@
 main(int argc, char *argv[])
 {
	int i, ok, stdout;
+ long mtime;

	level = 6;
	stdout = 0;
+ mtime = time(0);
	ARGBEGIN{
	case 'D':
		debug++;
@@ -46,6 +48,9 @@
	case '5': case '6': case '7': case '8': case '9':
		level = ARGC() - '0';
		break;
+ case 'n':
+ mtime = 0;
+ break;
	default:
		usage();
		break;
@@ -58,7 +63,7 @@

	if(argc == 0){
		Binit(&bout, 1, OWRITE);
- ok = gzip(nil, time(0), 0, &bout);
+ ok = gzip(nil, mtime, 0, &bout);
		Bterm(&bout);
	}else{
		ok = 1;


Wed Jul 21 10:30:47 EDT 2021
---
//.git/fs/object/669b3abd702b934927499d976e563a1d663f9648/tree/sys/src/cmd/gzip/gzip.c
+++ sys/src/cmd/gzip/gzip.c
@@ -17,11 +17,12 @@
 static int level;
 static ulong totr;
 static int verbose;
+static int nostamp;

 void
 usage(void)
 {
- fprint(2, "usage: gzip [-vcD] [-1-9] [file ...]\n");
+ fprint(2, "usage: gzip [-vncD] [-1-9] [file ...]\n");
	exits("usage");
 }

@@ -32,6 +33,7 @@

	level = 6;
	stdout = 0;
+ nostamp = 0;
	ARGBEGIN{
	case 'D':
		debug++;
@@ -39,6 +41,8 @@
	case 'v':
		verbose++;
		break;
+ case 'n':
+ nostamp = 1;
	case 'c':
		stdout = 1;
		break;
@@ -146,6 +150,9 @@
	if(file != nil)
		flags |= GZFNAME;
	Bputc(bout, flags);
+
+ if (nostamp)
+ mtime = 0;

	Bputc(bout, mtime);
	Bputc(bout, mtime>>8);


prev | next