summaryrefslogtreecommitdiffstats
path: root/src/fuse/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fuse/main.c')
-rw-r--r--src/fuse/main.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/fuse/main.c b/src/fuse/main.c
index 7be34bd..f76cfb6 100644
--- a/src/fuse/main.c
+++ b/src/fuse/main.c
@@ -307,8 +307,10 @@ static void image_ll_setattr( fuse_req_t req, fuse_ino_t ino, struct stat *attr,
return;
}
if (to_set & FUSE_SET_ATTR_SIZE) {
- cowfile_setSize( req, attr->st_size, ino, fi);
+ cowfile_setSize( req, attr->st_size, ino, fi);
+ return;
}
+ fuse_reply_error( req, EACCES );
}
/* map the implemented fuse operations */
@@ -402,7 +404,6 @@ int main( int argc, char *argv[] )
char *cow_server_address = NULL;
char *image_Name = NULL;
char *log_file = NULL;
- cow_merge_after_upload = false;
uint16_t rid = 0;
char **newArgv;
int newArgc;
@@ -547,13 +548,14 @@ int main( int argc, char *argv[] )
struct sigaction newHandler = { .sa_handler = &noopSigHandler };
sigemptyset( &newHandler.sa_mask );
sigaction( SIGHUP, &newHandler, NULL );
+ sigaction( SIGQUIT, &newHandler, NULL );
} while ( 0 );
- if ( useCow ) {
- sigset_t sigmask;
- sigemptyset( &sigmask );
- sigaddset( &sigmask, SIGQUIT ); // Block here and unblock in cow as abort signal
- pthread_sigmask( SIG_BLOCK, &sigmask, NULL );
- }
+ if ( useCow ) {
+ sigset_t sigmask;
+ sigemptyset( &sigmask );
+ sigaddset( &sigmask, SIGQUIT ); // Block here and unblock in cow as abort signal
+ pthread_sigmask( SIG_BLOCK, &sigmask, NULL );
+ }
if ( !connection_init( server_address, image_Name, rid, learnNewServers ) ) {
logadd( LOG_ERROR, "Could not connect to any server. Bye.\n" );
@@ -642,11 +644,3 @@ int main( int argc, char *argv[] )
logadd( LOG_DEBUG1, "Terminating. FUSE REPLIED: %d\n", fuse_err );
return fuse_err;
}
-
-void main_shutdown(void)
-{
- fuse_session_exit( _fuseSession );
- // TODO: Figure out why this doesn't wake up the fuse mainloop.
- // For now, just send SIGQUIT followed by SIGTERM....
- kill( 0, SIGINT );
-}