Commit graph

40 commits

Author SHA1 Message Date
Jakub Klama
56bfe1cd50 Merge pull request #2 from Jc2k/use-lstat
Use lstat instead of stat in fs_create.
2016-03-21 18:22:07 +01:00
John Carr
85c49d672a Use lstat instead of stat in fs_create.
Doesn't matter if the symlink target exists or not, so should use
lstat().
2016-03-21 16:27:44 +00:00
Jakub Klama
50acc73d55 Need to open directory fd before using bindat(). 2016-02-21 14:51:08 -08:00
Jakub Klama
ab8fd88af2 Use bindat() to overcome 104-character unix domain socket path limit. 2016-02-18 21:16:54 +01:00
Jakub Klama
7be3e0b914 Integrate (slightly modified) pull request #1 from ailispaw.
Pull request was originally issued in xhyve
repo: https://github.com/jceel/xhyve/pull/1
2016-02-03 10:03:29 +01:00
Jakub Klama
23ad660dd0 Populate file->gid from parent fid. 2016-02-03 09:31:19 +01:00
Jakub Klama
8f92f565e4 Revert accidentally committed changes. 2016-02-02 16:31:33 +01:00
Jakub Klama
007bd57119 Fix crashes in legacy (9P2000) mode. 2016-02-02 16:22:23 +01:00
Jakub Klama
e5533b16b6 Kill fid when Tattach fails. 2016-02-02 02:44:13 +01:00
Jakub Klama
ea28e8eeec Fix whitespaces. 2016-02-01 14:45:59 +01:00
Jakub Klama
e35c023dac Return correct qids in Ropen and Rcreate. 2016-02-01 14:44:28 +01:00
Jakub Klama
fb73d5ca47 Fix typo. 2016-02-01 02:32:12 +01:00
Jakub Klama
43c709a296 Add license information. 2016-02-01 01:17:43 +01:00
Jakub Klama
3b98045f24 Use socket() and bind() to create Unix domain socket.
Add better error checking to mkfifo() and symlink().
2016-02-01 00:16:05 +01:00
Jakub Klama
79231de3c1 Reformat makefile. 2016-01-31 23:05:33 +01:00
Jakub Klama
b28e30d743 Implement chown; properly report block and char devices. 2016-01-31 23:05:04 +01:00
Jakub Klama
b32fbd64d5 Remove debug logging by default. 2016-01-31 23:02:36 +01:00
Jakub Klama
8f06de489c Fix "unused variable" warnings. 2016-01-31 23:02:13 +01:00
Jakub Klama
26f87be168 Make it (mostly) compile with -Weverything.
Also:
- add support for block devices.
- fix various memory leaks.
2016-01-31 20:50:18 +01:00
Jakub Klama
10aaea4971 Make 9P2000.u default version now. 2016-01-31 04:58:34 +01:00
Jakub Klama
e50eaea07a Add support for symlinks.
Optimize some code paths for 9P2000.u case.
2016-01-31 03:17:12 +01:00
Jakub Klama
8c8239a88f Fix GNUmakefile. 2016-01-31 02:57:38 +01:00
Jakub Klama
ff65b2338b Put build products in build/ directory. 2016-01-31 02:07:53 +01:00
Jakub Klama
e9a6a2c64c Add build/ to .gitignore. 2016-01-31 02:06:42 +01:00
Jakub Klama
2ceba3eb71 Add makefile in GNU make format for OS X. 2016-01-31 02:03:58 +01:00
Jakub Klama
3cbe77cd4f Retry interrupted kevent() call. 2016-01-31 02:02:53 +01:00
Jakub Klama
456e2df90c Check for argv[1] presence. 2016-01-31 02:02:17 +01:00
Jakub Klama
5b2c47bda9 Reformat code, add some assertions. 2016-01-31 02:00:55 +01:00
Jakub Klama
3baea0c48f A bunch of changes described below.
- Initial support for 9P2000.u protocol
- Initial write support.
- Switch from lists to hashtable for storing tags and fids
- Make logging optional (dependent on compile-time constant)
- Drain tags and fids on connection close.
2016-01-31 01:56:11 +01:00
Jakub Klama
ac0155dd1b Add hashtable.c to the build. 2016-01-31 01:55:47 +01:00
Jakub Klama
fcfdba2cfb Reformat file, add 9P mode definitions. 2016-01-31 01:53:48 +01:00
Jakub Klama
3367fb46ea Reformat file, improve l9p_describe_fcall(). 2016-01-31 01:53:02 +01:00
Jakub Klama
1fedce2aa6 Use wrappers for malloc() and calloc().
They will come handy for putting lib9p in the kernel.
2016-01-31 01:52:08 +01:00
Jakub Klama
c9624690a9 Add simple hashtable implementation.
This is to replace using inefficient lists to store tags and
fids.
2016-01-31 01:51:03 +01:00
Jakub Klama
830759c75e Add minimal libsbuf implementation for Mac OS X. 2016-01-31 01:50:35 +01:00
Jakub Klama
d3e4c06341 First pass at 9P2000.u support. 2016-01-28 15:18:55 +01:00
Jakub Klama
91ad441d73 Rework code significantly.
- Use vectored I/O everywhere
- Add routines to pretty-print 9P requests
- Improve code style
- Implement clunk request
and so on.
2016-01-28 00:40:43 +01:00
Jakub Klama
080c92c18f Semi-functional file listing and reading. 2016-01-23 22:57:40 +01:00
Jakub Klama
f46d2136e9 Initial, non-functional code drop. 2016-01-23 18:45:17 +01:00
Jakub Klama
be76f4b73e Initial commit 2015-12-28 00:14:46 +01:00