9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] libdisk/proto error?
@ 2012-12-28  7:44 erik quanstrom
  0 siblings, 0 replies; only message in thread
From: erik quanstrom @ 2012-12-28  7:44 UTC (permalink / raw)
  To: 9fans

replica/updatedb was not happy with a proto file.  each proto line like this

		smtpd	a600	bootes	bootes	/tmp/empty

generated an error like this

	warning: can't stat file /tmp/empty/: '/tmp/empty/' not a directory

note the proto doesn't have a trailing /.  i think this change (already in revproto.c)
does the trick.  am i missing something?

/n/dump/2012/1227/sys/src/libdisk/proto.c:216,222 - /sys/src/libdisk/proto.c:212,219
  		name->s = emalloc(mkaux, l+SLOP);
  		name->n = l+SLOP;
  	}
- 	snprint(name->s, name->n, "%s%s%s", s1, s1[0]==0 || s1[strlen(s1)-1]!='/' ? "/" : "", s2);
+ 	snprint(name->s, name->n, "%s%s%s", s1, s2[0] && s2[0]!='/' ? "/" : "", s2);
  }

  static int

- erik



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

only message in thread, other threads:[~2012-12-28  7:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-28  7:44 [9fans] libdisk/proto error? erik quanstrom

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).