Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309884
b: refs/heads/master
c: a27202f
h: refs/heads/master
v: v3
  • Loading branch information
Jim Meyering authored and Josef Bacik committed May 30, 2012
1 parent 697002c commit cfa850e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f07c9a79f06cd33b1c9c2c4eacb60bafa7e3f310
refs/heads/master: a27202fbe92b12eec895c36644440175de01d7a6
6 changes: 4 additions & 2 deletions trunk/fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2263,10 +2263,12 @@ static long btrfs_ioctl_dev_info(struct btrfs_root *root, void __user *arg)
di_args->bytes_used = dev->bytes_used;
di_args->total_bytes = dev->total_bytes;
memcpy(di_args->uuid, dev->uuid, sizeof(di_args->uuid));
if (dev->name)
if (dev->name) {
strncpy(di_args->path, dev->name, sizeof(di_args->path));
else
di_args->path[sizeof(di_args->path) - 1] = 0;
} else {
di_args->path[0] = '\0';
}

out:
if (ret == 0 && copy_to_user(arg, di_args, sizeof(*di_args)))
Expand Down

0 comments on commit cfa850e

Please sign in to comment.