shithub: riscv

Download patch

ref: bf9bada0c246ef96ee168e355b26e4dc67396ee4
parent: 95609d520e31f3f2262764b14b8016ca940af01d
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Nov 1 05:50:25 EDT 2016

winwatch: put previous label contents in edit buffer for relabling

--- a/sys/src/cmd/winwatch.c
+++ b/sys/src/cmd/winwatch.c
@@ -241,8 +241,8 @@
 	char buf[512], fname[128];
 	int n, fd;
 
-	buf[0] = 0;
-	n = eenter("label?", buf, sizeof(buf), &m);
+	snprint(buf, sizeof(buf), "%s", w.label);
+	n = eenter(nil, buf, sizeof(buf), &m);
 	if(n <= 0)
 		return 0;
 	sprint(fname, "/dev/wsys/%d/label", w.n);