#include <netinet/in.h>
#include <unistd.h>
#endif
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+
#include <dirent.h>
#include <sys/stat.h>
#include <rx/xdr.h>
#include "volint.h"
extern int DoLogging;
extern struct volser_trans *FindTrans(), *NewTrans(),*TransList();
-extern struct rx_securityClass *rxnull_NewServerSecurityObject();
-extern struct rx_service *rx_NewService();
-extern struct rx_securityClass *rxnull_NewClientSecurityObject();
extern struct afsconf_dir *tdir;
extern char *volutil_PartitionName();
if (ConvertPartition(apartid, pbuf, sizeof(pbuf))) {
*error = EINVAL;
- return (struct Volume *) 0;
+ return NULL;
}
if (ConvertVolume(avolid, vbuf, sizeof(vbuf))) {
*error = EINVAL;
- return (struct Volume *) 0;
+ return NULL;
}
tv = VAttachVolumeByName(error, pbuf, vbuf, amode);
return tv;
}
}
else {
- purgevp = (struct Volume *) 0;
+ purgevp = NULL;
}
originalvp = tt->volume;
if ((V_type(originalvp) == backupVolume) || (V_type(originalvp) == readonlyVolume)){
if (purgevp)
Log("1 Volser: Clone: Purging old read only volume %u\n", purgeId);
CloneVolume(&error, originalvp, newvp, purgevp);
- purgevp = (struct Volume *) 0; /* clone releases it, maybe even if error */
+ purgevp = NULL; /* clone releases it, maybe even if error */
if (error) {
Log("1 Volser: Clone: clone operation failed with code %d\n", error);
LogError(error);
goto fail;
}
VDetachVolume(&error, newvp); /* allow file server to get it's hands on it */
- newvp = (struct Volume *) 0;
+ newvp = NULL;
VUpdateVolume(&error, originalvp);
if (error) {
Log("1 Volser: Clone: original update %d\n", error);
goto fail;
}
VDetachVolume(&error, clonevp); /* allow file server to get it's hands on it */
- clonevp = (struct Volume *) 0;
+ clonevp = NULL;
VUpdateVolume(&error, originalvp);
if (error) {
Log("1 Volser: Clone: original update %d\n", error);
strcpy(tt->lastProcName,"Restore");
tt->rxCallPtr = acid;
code = RestoreVolume(acid, tt->volume, (aflags & 1),cookie); /* last is incrementalp */
- FSYNC_askfs(tt->volid, (char *) 0, FSYNC_RESTOREVOLUME, 0l);/*break call backs on the
+ FSYNC_askfs(tt->volid, NULL, FSYNC_RESTOREVOLUME, 0l);/*break call backs on the
restored volume */
tt->rxCallPtr = (struct rx_call *)0;
tcode = TRELE(tt);
}
strcpy(tt->lastProcName,"SetForwarding");
tt->rxCallPtr = acid;
- FSYNC_askfs(tt->volid, (char *) 0, FSYNC_MOVEVOLUME, anewsite);
+ FSYNC_askfs(tt->volid, NULL, FSYNC_MOVEVOLUME, anewsite);
tt->rxCallPtr = (struct rx_call *)0;
if(TRELE(tt)) return VOLSERTRELE_ERROR;
struct volser_trans *tt;
register int len;
- *aname = (char *)0;
+ *aname = NULL;
tt = FindTrans(atrans);
if (!tt) return ENOENT;
if (tt->vflags & VTDeleted) {