Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
293e6a8a
Commit
293e6a8a
authored
6 years ago
by
Steven Murray
Browse files
Options
Downloads
Patches
Plain Diff
Removed unused rmc_mnt function
parent
32c03b57
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mediachanger/castorrmc/rmc/rmc_mnt.c
+0
-87
0 additions, 87 deletions
mediachanger/castorrmc/rmc/rmc_mnt.c
mediachanger/castorrmc/rmc/rmc_mnt.man
+0
-57
0 additions, 57 deletions
mediachanger/castorrmc/rmc/rmc_mnt.man
with
0 additions
and
144 deletions
mediachanger/castorrmc/rmc/rmc_mnt.c
deleted
100644 → 0
+
0
−
87
View file @
32c03b57
/******************************************************************************
*
* 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
*****************************************************************************/
/* rmc_mnt - mount a cartridge into a drive that maybe in either */
/* a SCSI compatible or an ACS compatible tape library */
#include
<stdlib.h>
#include
<sys/types.h>
#include
<unistd.h>
#include
<netinet/in.h>
#include
"marshall.h"
#include
"rmc_api.h"
#include
"rmc_constants.h"
#include
"serrno.h"
#include
<errno.h>
#include
<string.h>
int
rmc_mnt
(
const
char
*
const
server
,
const
char
*
const
vid
,
const
char
*
const
loader
)
{
const
gid_t
gid
=
getgid
();
const
uid_t
uid
=
getuid
();
/* The total length of the fixed size members of the request message */
/* is Magic (4 bytes) + request ID (4 bytes) + length (4 bytes) + */
/* uid (4 bytes) + gid (4 bytes) = 20 bytes */
const
int
msglen
=
20
+
strlen
(
vid
)
+
1
+
strlen
(
loader
)
+
1
;
char
repbuf
[
1
];
char
*
sbp
=
NULL
;
char
sendbuf
[
RMC_REQBUFSZ
];
/* Consider the function arguments invalid if the total size of the */
/* request message would be greater than RMC_REQBUFSZ */
if
(
msglen
>
RMC_REQBUFSZ
)
{
errno
=
ERMCUNREC
;
serrno
=
errno
;
return
-
1
;
}
/* Build request header */
sbp
=
sendbuf
;
marshall_LONG
(
sbp
,
RMC_MAGIC
);
marshall_LONG
(
sbp
,
RMC_MOUNT
);
marshall_LONG
(
sbp
,
msglen
);
/* Build request body */
marshall_LONG
(
sbp
,
uid
);
marshall_LONG
(
sbp
,
gid
);
marshall_STRING
(
sbp
,
vid
);
marshall_STRING
(
sbp
,
loader
);
/* Being paranoid; checking the calculated message length against */
/* the number of bytes marshalled */
if
(
sbp
-
sendbuf
!=
msglen
)
{
errno
=
SEINTERNAL
;
serrno
=
errno
;
return
-
1
;
}
return
send2rmc
(
server
,
sendbuf
,
msglen
,
repbuf
,
sizeof
(
repbuf
));
}
This diff is collapsed.
Click to expand it.
mediachanger/castorrmc/rmc/rmc_mnt.man
deleted
100644 → 0
+
0
−
57
View file @
32c03b57
.\" Copyright (C) 2002 by CERN/IT/PDP/DM
.\" All rights reserved
.\"
.TH RMC_MNT 3 "$Date: 2013/11/18 16:21:00 $" CASTOR "rmc Library Functions"
.SH NAME
rmc_mnt \- send a request to the Remote Media Changer daemon to have a volume mounted
.SH SYNOPSIS
.B #include <sys/types.h>
.br
\fB#include "rmc_api.h"\fR
.sp
.BI "int rmc_mnt (char *" server ,
.BI "char *" vid ,
.BI "char *" loader );
.SH DESCRIPTION
.B rmc_mnt
asks the Remote Media Changer server running on
.I server
to mount the volume
.I vid
on the drive specified by
.IR loader .
.TP
.I server
specifies the Remote Media Changer to be contacted.
.TP
.I vid
is the volume visual identifier.
It must be at most six characters long.
.TP
.I loader
specifies the drive in the robot in the following form:
.RS
.TP
smcDRIVE_ORDINAL
.RE
.SH RETURN VALUE
This routine returns 0 if the operation was successful or -1 if the operation
failed. In the latter case,
.B serrno
have been set appropriately.
.SH ERRORS
.TP 1.2i
.B SECOMERR
Communication error.
.TP
.B ERMCUNREC
Invalid loader or vid too long.
.TP
.B ERMCFASTR
Unit attention.
.TP
.B ERMCOMSGR
Hardware error or Medium Removal Prevented.
.SH AUTHOR
\fBCASTOR\fP Team <castor.support@cern.ch>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment