git://git.onelab.eu
/
vsys-wrappers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cb48373
)
(no commit message)
author
Sapan Bhatia
<sapanb@cs.princeton.edu>
Wed, 25 Mar 2009 13:33:30 +0000
(13:33 +0000)
committer
Sapan Bhatia
<sapanb@cs.princeton.edu>
Wed, 25 Mar 2009 13:33:30 +0000
(13:33 +0000)
fuse/reroutemount.c
patch
|
blob
|
history
diff --git
a/fuse/reroutemount.c
b/fuse/reroutemount.c
index
4ded3bb
..
3fa229e
100644
(file)
--- a/
fuse/reroutemount.c
+++ b/
fuse/reroutemount.c
@@
-6,9
+6,9
@@
#include <sys/un.h>
#include "stolen_from_fuse.h"
#include <sys/un.h>
#include "stolen_from_fuse.h"
-char *socket_name = "/vsys/
local
_fusemount.control";
+char *socket_name = "/vsys/
fd
_fusemount.control";
-int
rrm_
connect_socket() {
+int connect_socket() {
int fd = socket( AF_UNIX, SOCK_STREAM, 0 );
struct sockaddr_un addr;
addr.sun_family = AF_UNIX;
int fd = socket( AF_UNIX, SOCK_STREAM, 0 );
struct sockaddr_un addr;
addr.sun_family = AF_UNIX;
@@
-18,7
+18,7
@@
int rrm_connect_socket() {
return fd;
}
return fd;
}
-void
rrm_
do_umount( char *const argv[], int n, int fd ) {
+void do_umount( char *const argv[], int n, int fd ) {
// write the length
char buf[1024];
// write the length
char buf[1024];
@@
-43,14
+43,14
@@
void rrm_do_umount( char *const argv[], int n, int fd ) {
int umount2( const char *mnt, int flags ) {
int umount2( const char *mnt, int flags ) {
- int fd =
rrm_
connect_socket();
+ int fd = connect_socket();
const char *argv[3];
argv[0] = "fusermount";
argv[1] = "-u";
argv[2] = mnt;
const char *argv[3];
argv[0] = "fusermount";
argv[1] = "-u";
argv[2] = mnt;
-
rrm_
do_umount( (char **const) argv, 3, fd );
+ do_umount( (char **const) argv, 3, fd );
close(fd);
close(fd);
@@
-59,8
+59,8
@@
int umount2( const char *mnt, int flags ) {
int mount(const char *source, const char *target, const char *filesystemtype,
unsigned long mountflags, const void *data) {
int mount(const char *source, const char *target, const char *filesystemtype,
unsigned long mountflags, const void *data) {
- int fd =
rrm_
connect_socket();
-
+ int fd = connect_socket();
+
char buf[1024];
sprintf( buf, "%08x\n", 0 );
write( fd, buf, strlen(buf) );
char buf[1024];
sprintf( buf, "%08x\n", 0 );
write( fd, buf, strlen(buf) );
@@
-82,7
+82,7
@@
int mount(const char *source, const char *target, const char *filesystemtype,
return -1;
} else if( r > 0 ) {
// get the fd
return -1;
} else if( r > 0 ) {
// get the fd
- fuse_fd = r
rm_r
eceive_fd(fd);
+ fuse_fd = receive_fd(fd);
// what was the old fd?
int old_fd;
// what was the old fd?
int old_fd;
@@
-120,9
+120,9
@@
int execv( const char *path, char *const argv[] ) {
}
// Have root do any fusermounts we need done
}
// Have root do any fusermounts we need done
- int fd =
rrm_
connect_socket();
+ int fd = connect_socket();
-
rrm_
do_umount( argv, n, fd );
+ do_umount( argv, n, fd );
exit(0);
exit(0);