search for: btrfsfsshow_uuid

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

2015 Jun 11
2
[PATCH] New API: btrfs_filesystem_show_all
...uuid_tmp = NULL; + } + + p += strlen ("uuid: "); + uuid_tmp = 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; + }...
2015 Jun 11
0
Re: [PATCH] New API: btrfs_filesystem_show_all
...of the strdup return value (also in other parts of this patch). > + p -= strlen ("uuid: "); > + *p = '\0'; > + label_tmp = strdup(p1); > + 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], "p...
2015 Jun 11
1
Re: [PATCH] New API: btrfs_filesystem_show_all
...; patch). > Oops.. > > + p -= strlen ("uuid: "); > > + *p = '\0'; > > + label_tmp = strdup(p1); > > + 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) ... > OK. > > + goto error; > > + if ((this->btrfsfsshow_label = strdup (label_tmp)) == NULL) > > + goto error; > &g...