cli: improve/add NM running checks

Check whether NetworkManager is running and return new error
NMC_RESULT_ERROR_NM_NOT_RUNNING when appropriate.
This commit is contained in:
Jiří Klimeš
2011-02-10 14:21:18 +01:00
parent 4242f18fb2
commit f29b709590
6 changed files with 167 additions and 92 deletions

View File

@@ -14,7 +14,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* (C) Copyright 2010 Red Hat, Inc.
* (C) Copyright 2010 - 2011 Red Hat, Inc.
*/
#ifndef NMC_NMCLI_H
@@ -47,7 +47,10 @@ typedef enum {
NMC_RESULT_ERROR_CON_DEACTIVATION = 5,
/* Error in device disconnect */
NMC_RESULT_ERROR_DEV_DISCONNECT = 6
NMC_RESULT_ERROR_DEV_DISCONNECT = 6,
/* NetworkManager is not running */
NMC_RESULT_ERROR_NM_NOT_RUNNING = 7
} NMCResultCode;
typedef enum {