]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Clean up remove/rename in 9p
authorSasha Levin <levinsasha928@gmail.com>
Mon, 7 Nov 2011 21:36:20 +0000 (23:36 +0200)
committerPekka Enberg <penberg@kernel.org>
Thu, 10 Nov 2011 06:49:42 +0000 (08:49 +0200)
Trivial cleanups.

Reported-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/virtio/9p.c

index 2392bd181fc3f88ee74724ebdbc873f19835ebc3..8104ac41ce6b5b9feebfc0ff29d319de8c597023 100644 (file)
@@ -683,13 +683,11 @@ static void virtio_p9_remove(struct p9_dev *p9dev,
        int ret;
        u32 fid_val;
        struct p9_fid *fid;
-       char full_path[PATH_MAX];
 
        virtio_p9_pdu_readf(pdu, "d", &fid_val);
        fid = &p9dev->fids[fid_val];
 
-       sprintf(full_path, "%s", fid->abs_path);
-       ret = remove(full_path);
+       ret = remove(fid->abs_path);
        if (ret < 0)
                goto err_out;
        *outlen = pdu->write_offset;
@@ -698,7 +696,7 @@ static void virtio_p9_remove(struct p9_dev *p9dev,
 
 err_out:
        virtio_p9_error_reply(p9dev, pdu, errno, outlen);
-       return; 
+       return;
 }
 
 static void virtio_p9_rename(struct p9_dev *p9dev,
@@ -724,9 +722,9 @@ static void virtio_p9_rename(struct p9_dev *p9dev,
 
 err_out:
        virtio_p9_error_reply(p9dev, pdu, errno, outlen);
-       return; 
+       return;
 }
-                              
+
 static void virtio_p9_readlink(struct p9_dev *p9dev,
                               struct p9_pdu *pdu, u32 *outlen)
 {