9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] distproto: add /sys/log/upasfs used by upasfs(4) option -l
@ 2025-01-08 11:30 igor
  0 siblings, 0 replies; only message in thread
From: igor @ 2025-01-08 11:30 UTC (permalink / raw)
  To: 9front; +Cc: igor

Any objections to add /sys/log/upasfs to distproto (see ↓)?

Without it 'upas/fs -l' wont work as advertised without first
manually creating the log file which might not be immediately
obvious.

——— ↓ [PATCH-PROPOSAL] ↓ ———

From: Igor Böhm <igor@9lab.org>
Date: Wed, 08 Jan 2025 11:26:13 +0000
Subject: [PATCH] distproto: add /sys/log/upasfs used by upasfs(4) option -l


upasfs(4) refers to /sys/log/fs when option -l is used:

 % grep '/sys/log/fs' `{walk -f /sys/man}
 /sys/man/4/upasfs:.BR /sys/log/fs .

However, this log file is not created via distproto.  Therefore
nothing will be logged to /sys/log/fs.

It is of course possible to create /sys/log/fs manually — assuming
cwfs(4) — via:

 % echo create /sys/log/fs sys sys 662 a >>/srv/cwfs.cmd

The log file name /sys/log/fs, however, is poorly chosen, as one will
not guess that it belongs to upas/fs from its rather generic name.

Hence the proposal is to:
 1) rename /sys/log/fs → /sys/log/upasfs
 2) create /sys/log/upasfs by default (via distproto)
---
diff c6a91038b10ac99e9c7501c59ff97f2573178215 3852908d5e88ab0ad68393f71013319c34ed1d4d
--- a/sys/lib/sysconfig/proto/distproto
+++ b/sys/lib/sysconfig/proto/distproto
@@ -406,6 +406,7 @@
 		smtp.fail	a662 sys sys /sys/lib/dist/empty
 		smtpd		a662 sys sys /sys/lib/dist/empty
 		smtpd.mx	a662 sys sys /sys/lib/dist/empty
+		upasfs		a662 sys sys /sys/lib/dist/empty
 
 		secstore	a662 sys sys /sys/lib/dist/empty
 		timesync	a662 sys sys /sys/lib/dist/empty
--- a/sys/man/4/upasfs
+++ b/sys/man/4/upasfs
@@ -349,7 +349,7 @@
 logging.  Turn on logging via syslog
 (and to the console with -\fIS\fP) to
 the file
-.BR /sys/log/fs .
+.BR /sys/log/upasfs .
 .TP
 .B -m \fImntpt\fP
 mount on
--- a/sys/src/cmd/upas/fs/mbox.c
+++ b/sys/src/cmd/upas/fs/mbox.c
@@ -1665,7 +1665,7 @@
 	return i;
 }
 
-static char *logf = "fs";
+static char *logf = "upasfs";
 
 void
 logmsg(Message *m, char *fmt, ...)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-01-08 11:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-08 11:30 [9front] distproto: add /sys/log/upasfs used by upasfs(4) option -l igor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).