search for: btrfsfsshow_label

Displaying 3 results from an estimated 3 matches for "btrfsfsshow_label".

2015 Jun 11
2
[PATCH] New API: btrfs_filesystem_show_all
...mp = strdup(p); + p -= strlen ("uuid: "); + *p = '\0'; + label_tmp = strdup(p1); + continue; + } + + if (STRPREFIX (line, "\tdevid")) { + if ((this->btrfsfsshow_uuid = strdup (uuid_tmp)) == NULL) + goto error; + if ((this->btrfsfsshow_label = strdup (label_tmp)) == NULL) + goto error; + + if ((p = strstr (lines[i], "path ")) == NULL) { + reply_with_error ("No path field found"); + goto error; + } + p += strlen ("path "); + if ((this->btrfsfsshow_device = strdup...
2015 Jun 11
0
Re: [PATCH] New API: btrfs_filesystem_show_all
...continue; > + } > + > + if (STRPREFIX (line, "\tdevid")) { > + if ((this->btrfsfsshow_uuid = strdup (uuid_tmp)) == NULL) Please don't mix statements and checks, so: x = strdup (s); if (x == NULL) ... > + goto error; > + if ((this->btrfsfsshow_label = strdup (label_tmp)) == NULL) > + goto error; > + > + if ((p = strstr (lines[i], "path ")) == NULL) { "line" is already set as lines[i], isn't it? > + reply_with_error ("No path field found"); > + goto error; > +...
2015 Jun 11
1
Re: [PATCH] New API: btrfs_filesystem_show_all
...TRPREFIX (line, "\tdevid")) { > > + if ((this->btrfsfsshow_uuid = strdup (uuid_tmp)) == NULL) > > Please don't mix statements and checks, so: > x = strdup (s); > if (x == NULL) ... > OK. > > + goto error; > > + if ((this->btrfsfsshow_label = strdup (label_tmp)) == NULL) > > + goto error; > > + > > + if ((p = strstr (lines[i], "path ")) == NULL) { > > "line" is already set as lines[i], isn't it? > Fine. > > + reply_with_error ("No path field found&quo...