Displaying 3 results from an estimated 3 matches for "btrfsfsshow_devid".
Did you mean:
btrfsfsshow_device
2015 Jun 11
2
[PATCH] New API: btrfs_filesystem_show_all
...h_error ("No path field found");
+ goto error;
+ }
+ p += strlen ("path ");
+ if ((this->btrfsfsshow_device = strdup (p)) == NULL)
+ goto error;
+ if (sscanf (line, "\tdevid %4d size %9s used %9s path",
+ &this->btrfsfsshow_devid,
+ this->btrfsfsshow_total_bytes,
+ this->btrfsfsshow_bytes_used) != 3) {
+ reply_with_error ("cannot parse output of filesystem show command: %s", line);
+ goto error;
+ }
+ k++;
+ }
+ }
+
+ if (label_tmp)
+ free (label_tm...
2015 Jun 11
1
Re: [PATCH] New API: btrfs_filesystem_show_all
...or;
> > + }
> > + p += strlen ("path ");
> > + if ((this->btrfsfsshow_device = strdup (p)) == NULL)
> > + goto error;
> > + if (sscanf (line, "\tdevid %4d size %9s used %9s path",
> > + &this->btrfsfsshow_devid,
> > + this->btrfsfsshow_total_bytes,
> > + this->btrfsfsshow_bytes_used) != 3) {
>
> Why not use this sscanf to also take the device, instead of looking for
> it manually using strstr?
If sscanf for device, we still need to calculate the len...
2015 Jun 11
0
Re: [PATCH] New API: btrfs_filesystem_show_all
...quot;);
> + goto error;
> + }
> + p += strlen ("path ");
> + if ((this->btrfsfsshow_device = strdup (p)) == NULL)
> + goto error;
> + if (sscanf (line, "\tdevid %4d size %9s used %9s path",
> + &this->btrfsfsshow_devid,
> + this->btrfsfsshow_total_bytes,
> + this->btrfsfsshow_bytes_used) != 3) {
Why not use this sscanf to also take the device, instead of looking for
it manually using strstr?
> + reply_with_error ("cannot parse output of filesystem show comm...