Commit graph

17 commits

Author SHA1 Message Date
kvik e5894dccea pre-lib9p servers: fix incorrect Tversion handling
version(5) says:

	If the server does not understand the client's version
	string, it should respond with an Rversion message (not
	Rerror) with the version string the 7 characters
	``unknown''.

Pre-lib9p file servers -- all except cwfs(4) -- do return Rerror.

lib9p(2) follows the above spec, although ignoring the next part
concerning comparison after period-stripping.  It assumes an
Fcall.version starting with "9P" is correctly formed and returns
the only supported version of the protocol, which seems alright.

This patch brings pre-lib9p servers in accordance with the spec.
2020-08-01 15:27:28 +02:00
Ori Bernstein d52d7bc121 Backed out changeset 2737b9af622b
not what I wanted to commit.
2020-04-25 10:57:17 -07:00
Ori Bernstein 2de164c51d fix typos in time calculation
the results of the time calculation were garbled -- and
apparently negative on my system when testing, so the
test passed when it shouldn't have.
2020-04-25 10:43:39 -07:00
cinap_lenrek 0ba0820070 dossrv: fix falloc() for >31 bit sector numbers (thanks sl) 2020-04-05 03:46:47 +02:00
cinap_lenrek feb6d6f0a3 dossrv, 9660srv, hjfs: stop *READING* standard *OUTPUT* with -s flag
with the -s flag, we should read 9P messages from
standard *INPUT* (fd 0) and write responses to
standard *OUTPUT* (fd 1).

before these servers where reading from fd 1,
assuming they where both the same files.
2020-03-07 20:27:20 +01:00
cinap_lenrek dce28e58e4 dossrv: output iotrack error message to stderr 2020-03-07 14:23:34 +01:00
cinap_lenrek 1eca33b48c always zero initialize Tm structure for tm2sec() 2019-12-03 08:22:02 +01:00
cinap_lenrek ec1c1b9b52 dossrv: cleanup 2018-12-24 01:21:47 +01:00
cinap_lenrek 1e0b65c8bf dossrv: make GLONG() return ulong, handle getsect() error in dostat() 2018-12-23 22:43:29 +01:00
cinap_lenrek 4a634d2102 dossrv: use 64 bit vlong for sectors 2018-12-22 20:49:24 +01:00
ftrvxmtrx 0930f44feb cmd: remove a bit of unused stuff 2016-11-17 02:59:40 +01:00
cinap_lenrek a0d4c5e208 make error handling in 9p service loops consistent
when we get eof, stop the loop immidiately and do not
rely on the read to eventually return an error.

when convM2S() fails to decode the message, error out
and stop the loop. there is no point in continuing.
2016-07-24 02:21:32 +02:00
cinap_lenrek 0e09795831 dossrv: handle file offsets > 2^31
maximum file size is 4GB-1 as the file length is stored in
a 32 bit long. make sure it doesnt overflow on write or
or truncate. interpret the file length as unsigned. pass
vlong to readfile()/writefile()/truncfile() so we can
handle overflows and not just ignore the upper bits.
2015-10-05 04:31:31 +02:00
cinap_lenrek 16b3a688c3 dossrv: maintain file creation date/time on disk, fsinfo sector can be 0 (disabled) 2015-06-04 04:34:08 +02:00
cinap_lenrek fa49f7e3ff dossrv: make dos 8+3 filenames lowercase 2012-04-14 13:21:31 +02:00
Taru Karttunen a9060cc06b Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
Taru Karttunen e5888a1ffd Import sources from 2011-03-30 iso image 2011-03-30 15:46:40 +03:00