From 57151a2f5d3da1e91cd45d0bd062098923269877 Mon Sep 17 00:00:00 2001 From: Steven Murray <murrayc3@cern.ch> Date: Wed, 2 Oct 2013 12:10:20 +0000 Subject: [PATCH] Moved the rbtsubr constants from h/Ctape.h to h/rbtsubr_constants.h --- mediachanger/castorrmc/h/rbtsubr_constants.h | 42 ++++++++++++++++++++ mediachanger/castorrmc/rmc/rmc_smcsubr.c | 1 + mediachanger/castorrmc/rmc/smc.c | 1 + 3 files changed, 44 insertions(+) create mode 100644 mediachanger/castorrmc/h/rbtsubr_constants.h diff --git a/mediachanger/castorrmc/h/rbtsubr_constants.h b/mediachanger/castorrmc/h/rbtsubr_constants.h new file mode 100644 index 0000000000..876b94d7f3 --- /dev/null +++ b/mediachanger/castorrmc/h/rbtsubr_constants.h @@ -0,0 +1,42 @@ +/****************************************************************************** + * rbtsubr_constants.h + * + * This file is part of the Castor project. + * See http://castor.web.cern.ch/castor + * + * Copyright (C) 2003 CERN + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * + * + * + * @author Castor Dev team, castor-dev@cern.ch + *****************************************************************************/ + +#ifndef _RBTSUBR_CONSTANTS_H +#define _RBTSUBR_CONSTANTS_H 1 + + /* rbtsubr return codes */ + +#define RBT_OK 0 /* Ok or error should be ignored */ +#define RBT_NORETRY 1 /* Unrecoverable error (just log it) */ +#define RBT_SLOW_RETRY 2 /* Should release drive & retry in 600 seconds */ +#define RBT_FAST_RETRY 3 /* Should retry in 60 seconds */ +#define RBT_DMNT_FORCE 4 /* Should do first a demount force */ +#define RBT_CONF_DRV_DN 5 /* Should configure the drive down */ +#define RBT_OMSG_NORTRY 6 /* Should send a msg to operator and exit */ +#define RBT_OMSG_SLOW_R 7 /* Ops msg (nowait) + release drive + slow retry */ +#define RBT_OMSGR 8 /* Should send a msg to operator and wait */ +#define RBT_UNLD_DMNT 9 /* Should unload the tape and retry demount */ + +#endif diff --git a/mediachanger/castorrmc/rmc/rmc_smcsubr.c b/mediachanger/castorrmc/rmc/rmc_smcsubr.c index 5c952720bd..72c3da660d 100644 --- a/mediachanger/castorrmc/rmc/rmc_smcsubr.c +++ b/mediachanger/castorrmc/rmc/rmc_smcsubr.c @@ -13,6 +13,7 @@ #include <sys/types.h> #include "h/Ctape.h" +#include "h/rbtsubr_constants.h" #include "h/rmc_constants.h" #include "h/rmc_send_scsi_cmd.h" #include "h/rmc_sendrep.h" diff --git a/mediachanger/castorrmc/rmc/smc.c b/mediachanger/castorrmc/rmc/smc.c index 7d5b1cf4ba..d13f8f5d28 100644 --- a/mediachanger/castorrmc/rmc/smc.c +++ b/mediachanger/castorrmc/rmc/smc.c @@ -10,6 +10,7 @@ #include <string.h> #include <unistd.h> #include "h/Ctape.h" +#include "h/rbtsubr_constants.h" #include "h/rmc_api.h" #include "h/serrno.h" #include "h/smc_constants.h" -- GitLab