move fcntl.h to plan9.h for open(); move getremotehostname to u9fs.h as local lib

This commit is contained in:
Charles Forsyth 2015-10-04 21:41:44 +01:00
parent 5478072781
commit 970b17b5bd
4 changed files with 33 additions and 3 deletions

31
9pfs.plist Normal file
View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.bell-labs.plan9.u9fs</string>
<key>Program</key>
<string>/bin/9/u9fs</string>
<key>ProgramArguments</key>
<array>
<string>u9fs</string>
<string>-l</string>
<string>/var/log/u9fs.log</string>
<string>-a</string>
<string>p9any</string>
</array>
<key>Sockets</key>
<dict>
<key>Listeners</key>
<dict>
<key>SockServiceName</key>
<string>9pfs</string>
</dict>
</dict>
<key>inetdCompatibility</key>
<dict>
<key>Wait</key>
<false/>
</dict>
</dict>
</plist>

View File

@ -45,6 +45,7 @@ typedef unsigned long long int uint64_t;
#endif /* va_copy */
#include <sys/types.h>
#include <string.h> /* for memmove */
#include <fcntl.h> /* for O_RDONLY, etc. */
#include <unistd.h> /* for write */
#define ulong p9ulong /* because sys/types.h has some of these sometimes */
@ -205,4 +206,3 @@ enum {
void key_setup(char key[DESKEYLEN], char expandedkey[128]);
void block_cipher(char expandedkey[128], char buf[8], int decrypting);
void getremotehostname(char*, int);

View File

@ -1,9 +1,7 @@
#include <plan9.h>
#include <fcall.h>
#include <u9fs.h>
#include <stdlib.h>
#include <sys/time.h>
#include <fcntl.h>
static long
getseed(void)

1
u9fs.h
View File

@ -28,3 +28,4 @@ Fid *newauthfid(int fid, void *magic, char **ep);
Fid *oldauthfid(int fid, void **magic, char **ep);
void safecpy(char *to, char *from, int len);
void getremotehostname(char*, int);