Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
190a016c
Commit
190a016c
authored
Oct 16, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DetachedVolume added
parent
b106f67f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
16 deletions
+30
-16
src/exe/rt_ini/src/ini.c
src/exe/rt_ini/src/ini.c
+30
-16
No files found.
src/exe/rt_ini/src/ini.c
View file @
190a016c
/*
* Proview $Id: ini.c,v 1.3
4 2008-09-18 15:04:41
claes Exp $
* Proview $Id: ini.c,v 1.3
5 2008-10-16 11:10:13
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -121,7 +121,7 @@ static pwr_tBoolean loadSectRbody (pwr_tStatus*, ini_sContext*, ivol_sVolume*);
static
pwr_tBoolean
loadSectScObject
(
pwr_tStatus
*
,
ini_sContext
*
,
ivol_sVolume
*
);
static
pwr_tBoolean
loadSectVolume
(
pwr_tStatus
*
,
ini_sContext
*
,
ivol_sVolume
*
);
static
pwr_tBoolean
readSectFile
(
pwr_tStatus
*
,
ini_sContext
*
,
ivol_sVolume
*
);
static
pwr_tBoolean
readSectVolRef
(
pwr_tStatus
*
,
ini_sContext
*
);
static
pwr_tBoolean
readSectVolRef
(
pwr_tStatus
*
,
ini_sContext
*
,
ivol_sVolume
*
);
static
pwr_tBoolean
readSectVolume
(
pwr_tStatus
*
,
ini_sContext
*
,
ivol_sVolume
*
);
static
gdb_sObject
*
reloadObject
(
pwr_tStatus
*
,
ini_sContext
*
,
ivol_sVolume
*
,
dbs_sObject
*
);
static
pwr_tBoolean
reloadSectObject
(
pwr_tStatus
*
,
ini_sContext
*
,
ivol_sVolume
*
);
...
...
@@ -303,7 +303,7 @@ readSectFile (
time_AtoAscii
(
&
vp
->
time
,
time_eFormat_DateAndTime
,
timbuf1
,
sizeof
(
timbuf1
));
time_AtoAscii
(
&
cp
->
dbs
.
file
.
time
,
time_eFormat_DateAndTime
,
timbuf2
,
sizeof
(
timbuf2
));
errh_LogWarning
(
&
cp
->
log
,
"Version missmatch for volume: %s, %s != %s
\n
"
,
errh_LogWarning
(
&
cp
->
log
,
"Version missmatch for volume: %s, %s != %s"
,
vp
->
name
,
timbuf1
,
timbuf2
);
cp
->
warnings
++
;
}
...
...
@@ -322,7 +322,8 @@ readSectFile (
static
pwr_tBoolean
readSectVolRef
(
pwr_tStatus
*
status
,
ini_sContext
*
cp
ini_sContext
*
cp
,
ivol_sVolume
*
dvp
)
{
dbs_sVolRef
volRef
;
...
...
@@ -362,7 +363,7 @@ readSectVolRef (
lst_InsertPred
(
NULL
,
&
cp
->
vol_lh
,
&
vp
->
ll
,
vp
);
vp
->
time
=
volRef
.
time
;
strcpy
(
vp
->
name
,
volRef
.
name
);
if
(
volRef
.
cid
!=
pwr_eClass_ClassVolume
)
if
(
!
cdh_isClassVolumeClass
(
volRef
.
cid
)
)
vp
->
isVolRef
=
1
;
vp
->
volRef
=
volRef
;
vp
->
oid_t
=
tree_CreateTable
(
sts
,
sizeof
(
pwr_tObjectIx
),
...
...
@@ -382,16 +383,29 @@ readSectVolRef (
#endif
}
else
if
(
vp
->
time
.
tv_sec
!=
0
)
{
/* Do some checks. */
if
(
time_Acomp
(
&
vp
->
time
,
&
volRef
.
time
)
!=
0
)
{
char
timbuf1
[
32
];
char
timbuf2
[
32
];
time_AtoAscii
(
&
vp
->
time
,
time_eFormat_DateAndTime
,
timbuf1
,
sizeof
(
timbuf1
));
time_AtoAscii
(
&
volRef
.
time
,
time_eFormat_DateAndTime
,
timbuf2
,
sizeof
(
timbuf2
));
errh_LogWarning
(
&
cp
->
log
,
"Version missmatch for volume: %s, %s != %s
\n
"
,
vp
->
name
,
timbuf1
,
timbuf2
);
cp
->
warnings
++
;
if
(
dvp
->
volume
.
cid
==
pwr_eClass_DetachedClassVolume
)
{
/* Check dvVersion */
if
(
vp
->
volume
.
dvVersion
!=
volRef
.
time
.
tv_sec
)
{
errh_LogWarning
(
&
cp
->
log
,
"Version missmatch for volume %s: %s, %u (present), %d (detached)"
,
dvp
->
name
,
vp
->
name
,
vp
->
volume
.
dvVersion
,
volRef
.
time
.
tv_sec
);
cp
->
warnings
++
;
}
else
errh_LogInfo
(
&
cp
->
log
,
"Detached volref for %s: %s, %u (present), %d (detached)"
,
dvp
->
name
,
vp
->
name
,
vp
->
volume
.
dvVersion
,
volRef
.
time
.
tv_sec
);
}
else
{
if
(
time_Acomp
(
&
vp
->
time
,
&
volRef
.
time
)
!=
0
)
{
char
timbuf1
[
32
];
char
timbuf2
[
32
];
time_AtoAscii
(
&
vp
->
time
,
time_eFormat_DateAndTime
,
timbuf1
,
sizeof
(
timbuf1
));
time_AtoAscii
(
&
volRef
.
time
,
time_eFormat_DateAndTime
,
timbuf2
,
sizeof
(
timbuf2
));
errh_LogWarning
(
&
cp
->
log
,
"Version missmatch for volume: %s, %s != %s"
,
vp
->
name
,
timbuf1
,
timbuf2
);
cp
->
warnings
++
;
}
}
}
}
...
...
@@ -1308,7 +1322,7 @@ ini_CheckVolumeFile (
break
;
case
dbs_eSect_volref
:
if
(
checkSect
(
sts
,
cp
,
sects
,
dbs_cVersionVolRef
))
readSectVolRef
(
sts
,
cp
);
readSectVolRef
(
sts
,
cp
,
vp
);
break
;
case
dbs_eSect_oid
:
checkSect
(
sts
,
cp
,
sects
,
dbs_cVersionOid
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment