diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-11-24 23:02:44 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-11-24 23:02:44 +0000 |
commit | a6d09a3adf895d233057451953f21a5f44b98c2b (patch) | |
tree | 98fc8b9c8eaab8d6191aafe2891766445a2ca6db /usr.sbin | |
parent | 6a49217e3ebda9acc524777f966e1ad25e36aaf8 (diff) |
Better error reporting.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ldomctl/mdstore.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/usr.sbin/ldomctl/mdstore.c b/usr.sbin/ldomctl/mdstore.c index 6167d86a2b0..88e3ebf7fa1 100644 --- a/usr.sbin/ldomctl/mdstore.c +++ b/usr.sbin/ldomctl/mdstore.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdstore.c,v 1.5 2012/11/24 11:50:45 kettenis Exp $ */ +/* $OpenBSD: mdstore.c,v 1.6 2012/11/24 23:02:43 kettenis Exp $ */ /* * Copyright (c) 2012 Mark Kettenis @@ -143,8 +143,17 @@ mdstore_rx_data(struct ldc_conn *lc, uint64_t svc_handle, void *data, int idx; if (mr->result != MDST_SUCCESS) { - DPRINTF(("Unexpected result 0x%x\n", mr->result)); - return; + switch (mr->result) { + case MDST_SET_EXISTS_ERR: + errx(1, "Configuration already exists"); + break; + case MDST_NOT_EXIST_ERR: + errx(1, "No such configuration"); + break; + default: + errx(1, "Unexpected result 0x%x\n", mr->result); + break; + } } switch (mdstore_command) { |