aboutsummaryrefslogtreecommitdiff
path: root/lib/libgeom/geom_ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libgeom/geom_ctl.c')
-rw-r--r--lib/libgeom/geom_ctl.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libgeom/geom_ctl.c b/lib/libgeom/geom_ctl.c
index b60c4c297257..8cc4c5b0c4b2 100644
--- a/lib/libgeom/geom_ctl.c
+++ b/lib/libgeom/geom_ctl.c
@@ -27,8 +27,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <sys/types.h>
@@ -194,7 +192,7 @@ gctl_rw_param(struct gctl_req *req, const char *name, int len, void *value)
const char *
gctl_issue(struct gctl_req *req)
{
- int fd, error;
+ int fd;
if (req == NULL)
return ("NULL request pointer");
@@ -212,11 +210,11 @@ gctl_issue(struct gctl_req *req)
fd = open(_PATH_DEV PATH_GEOM_CTL, O_RDONLY);
if (fd < 0)
return(strerror(errno));
- error = ioctl(fd, GEOM_CTL, req);
+ req->nerror = ioctl(fd, GEOM_CTL, req);
close(fd);
if (req->error[0] != '\0')
return (req->error);
- if (error != 0)
+ if (req->nerror == -1)
return(strerror(errno));
return (NULL);
}