Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Cleanup of linkage issues for non-Linux hosts
[palacios.git] / linux_module / iface-keyed-stream.c
index 3b36d6a..5bce431 100644 (file)
@@ -726,7 +726,7 @@ static v3_keyed_stream_t open_stream_file(char *url,
 
            de = lookup_create(&nd,1);
 
-           if (IS_ERR(de)) { 
+           if (!de || IS_ERR(de)) { 
                ERROR("cannot allocate dentry\n");
                goto fail_out;
            }
@@ -800,7 +800,7 @@ static v3_keyed_stream_key_t open_key_file(v3_keyed_stream_t stream,
     strcat(path,"/");
     strcat(path,key);
     
-    fs = (struct file_stream *) palacios_alloc(sizeof(struct file_stream *));
+    fs = (struct file_stream *) palacios_alloc(sizeof(struct file_stream));
     
     if (!fs) { 
        ERROR("cannot allocate file keyed stream for key %s\n",key);
@@ -810,9 +810,9 @@ static v3_keyed_stream_key_t open_key_file(v3_keyed_stream_t stream,
 
     fs->stype=STREAM_FILE;
 
-    fs->f = filp_open(path,O_RDWR|O_CREAT,0600);
-    
-    if (IS_ERR(fs->f)) {
+    fs->f = filp_open(path,O_RDWR|O_CREAT|O_LARGEFILE,0600);
+
+    if (!fs->f || IS_ERR(fs->f)) {
        ERROR("cannot open relevent file \"%s\" for stream \"file:%s\" and key \"%s\"\n",path,fks->path,key);
        palacios_free(fs);
        palacios_free(path);
@@ -3177,6 +3177,7 @@ static int guest_init_keyed_streams(struct v3_guest * guest, void ** vm_data )
 
 static int guest_deinit_keyed_streams(struct v3_guest * guest, void * vm_data)
 {
+    remove_guest_ctrl(guest, V3_VM_KSTREAM_USER_CONNECT);
 
     return 0;
 }