~ubuntu-branches/ubuntu/feisty/openafs/feisty

« back to all changes in this revision

Viewing changes to src/volser/dumpstuff.c

  • Committer: Package Import Robot
  • Author(s): Russ Allbery
  • Date: 2007-03-26 18:56:55 UTC
  • Revision ID: package-import@ubuntu.com-20070326185655-osce8n0y0dptgurh
* New upstream release.  (Closes: #415699)
  - Support newer Linux kernels.  (Closes: #409797, #410120)
  - Add aklog fallbacks for null realms to support the referral
    capability in MIT Kerberos 1.6 and later.  (Closes: #410314)
* Apply patch from Thomas Sesselmann to support setting options to pass
  to bosserver in /etc/default/openafs-fileserver.  (Closes: #409357)
* Remove the rx_Init calls in the PAM module.  The internal counters
  that had to be initialized that way have been removed.
* Now that we're running regen.sh as part of the build process, only
  patch the Autoconf source files and not the generated output to make
  the diff easier to audit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
#include <afs/param.h>
12
12
 
13
13
RCSID
14
 
    ("$Header: /cvs/openafs/src/volser/dumpstuff.c,v 1.25.2.5 2006/10/13 12:46:03 shadow Exp $");
 
14
    ("$Header: /cvs/openafs/src/volser/dumpstuff.c,v 1.25.2.8 2006/12/19 04:51:08 shadow Exp $");
15
15
 
16
16
#include <sys/types.h>
17
17
#include <ctype.h>
990
990
            if (Buf == NULL) {
991
991
                STREAM_CLOSE(afile);
992
992
                FDH_CLOSE(fdP);
993
 
                return 1;
 
993
                return -1;
994
994
            }
995
995
            memset((char *)Buf, 0, nVnodes * sizeof(afs_int32));
996
996
            STREAM_SEEK(afile, offset = vcp->diskSize, 0);
1027
1027
    struct iod iod;
1028
1028
    register struct iod *iodp = &iod;
1029
1029
    afs_int32 *b1 = NULL, *b2 = NULL;
1030
 
    int s1 = 0, s2 = 0, delo = incremental, tdelo;
 
1030
    int s1 = 0, s2 = 0, delo = 0, tdelo;
1031
1031
    int tag;
1032
1032
 
1033
1033
    iod_Init(iodp, call);
1034
1034
 
1035
1035
    vp = avp;
 
1036
    if (V_parentId(vp) == V_id(vp))
 
1037
      delo = incremental;
 
1038
 
1036
1039
    if (!ReadDumpHeader(iodp, &header)) {
1037
1040
        Log("1 Volser: RestoreVolume: Error reading header file for dump; aborted\n");
1038
1041
        return VOLSERREAD_DUMPERROR;
1048
1051
        delo = ProcessIndex(vp, vLarge, &b1, &s1, 0);
1049
1052
    if (!delo)
1050
1053
        delo = ProcessIndex(vp, vSmall, &b2, &s2, 0);
1051
 
    if (delo) {
1052
 
        if (b1)
1053
 
            free((char *)b1);
1054
 
        if (b2)
1055
 
            free((char *)b2);
1056
 
        b1 = b2 = NULL;
1057
 
        s1 = s2 = 0;
 
1054
    if (delo < 0) {
 
1055
        Log("1 Volser: RestoreVolume: ProcessIndex failed; not restored\n");
 
1056
        error = VOLSERREAD_DUMPERROR;
 
1057
        goto out;
1058
1058
    }
1059
1059
 
1060
1060
    strncpy(vol.name, cookie->name, VOLSER_OLDMAXVOLNAME);
1062
1062
    vol.cloneId = cookie->clone;
1063
1063
    vol.parentId = cookie->parent;
1064
1064
 
1065
 
 
1066
1065
    tdelo = delo;
1067
1066
    while (1) {
1068
1067
        if (ReadVnodes(iodp, vp, 0, b1, s1, b2, s2, tdelo)) {
1095
1094
    if (!delo) {
1096
1095
        delo = ProcessIndex(vp, vLarge, &b1, &s1, 1);
1097
1096
        if (!delo)
1098
 
            ProcessIndex(vp, vSmall, &b2, &s2, 1);
1099
 
        if (delo) {
 
1097
            delo = ProcessIndex(vp, vSmall, &b2, &s2, 1);
 
1098
        if (delo < 0) {
1100
1099
            error = VOLSERREAD_DUMPERROR;
1101
1100
            goto clean;
1102
1101
        }