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
f1f8976e
Commit
f1f8976e
authored
Jun 17, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DevOnly objects in loadfile, and version check of loadfiles
parent
1f973fab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
src/exe/rt_ini/src/ini.c
src/exe/rt_ini/src/ini.c
+17
-11
No files found.
src/exe/rt_ini/src/ini.c
View file @
f1f8976e
...
...
@@ -94,7 +94,7 @@ static pwr_tBoolean loadSectObject (pwr_tStatus*, ini_sContext*, ivol_sVolume*);
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
*
);
static
pwr_tBoolean
readSectFile
(
pwr_tStatus
*
,
ini_sContext
*
,
ivol_sVolume
*
);
static
pwr_tBoolean
readSectVolRef
(
pwr_tStatus
*
,
ini_sContext
*
);
static
pwr_tBoolean
readSectVolume
(
pwr_tStatus
*
,
ini_sContext
*
,
ivol_sVolume
*
);
static
gdb_sObject
*
reloadObject
(
pwr_tStatus
*
,
ini_sContext
*
,
ivol_sVolume
*
,
dbs_sObject
*
);
...
...
@@ -245,7 +245,8 @@ oidToObject (
static
pwr_tBoolean
readSectFile
(
pwr_tStatus
*
status
,
ini_sContext
*
cp
ini_sContext
*
cp
,
ivol_sVolume
*
vp
)
{
char
timbuf
[
32
];
...
...
@@ -265,9 +266,9 @@ readSectFile (
if
(
!
cp
->
node
.
rtVersion
.
tv_sec
)
cp
->
node
.
rtVersion
=
cp
->
dbs
.
file
.
time
;
#if 1
printf
(
"Comment in file is not OK. fix when dbs_File is OK
\n
"
);
#
else
vp
->
time
=
cp
->
dbs
.
file
.
time
;
#
if 0
if (strlen (cp->dbs.file.comment) > 0) {
errh_LogInfo(&cp->log, "%s", cp->dbs.file.comment);
}
...
...
@@ -347,7 +348,7 @@ readSectVolRef (
time_AtoAscii
(
&
volRef
.
time
,
time_eFormat_DateAndTime
,
timbuf2
,
sizeof
(
timbuf2
));
errh_LogWarning
(
&
cp
->
log
,
"Version missmatch for volume: %s, %s != %s
\n
"
,
vp
->
volume
.
name
,
timbuf1
,
timbuf2
);
vp
->
name
,
timbuf1
,
timbuf2
);
cp
->
warnings
++
;
}
}
...
...
@@ -423,7 +424,7 @@ loadSectRbody (
bp
=
ivol_GetBody
(
sts
,
ob
.
oid
,
NULL
);
if
(
bp
==
NULL
)
{
errh_LogError
(
&
cp
->
log
,
"Cannot find body of object %s
\n
%m"
,
cdh_ObjidToString
(
NULL
,
ob
.
oid
,
0
),
*
sts
);
//
errh_LogError(&cp->log, "Cannot find body of object %s\n%m", cdh_ObjidToString(NULL, ob.oid, 0), *sts);
}
else
{
if
(
dbs_dAlign
(
bp
->
size
)
<
ob
.
size
)
{
errh_LogError
(
&
cp
->
log
,
"Data beyond size of body, Objid %s"
,
cdh_ObjidToString
(
NULL
,
ob
.
oid
,
0
));
...
...
@@ -508,7 +509,7 @@ reloadSectRbody (
}
if
(
iop
->
body
==
NULL
)
{
errh_LogError
(
&
cp
->
log
,
"Cannot find body of object %s
\n
%m"
,
cdh_ObjidToString
(
NULL
,
ob
.
oid
,
0
),
sts
);
//
errh_LogError(&cp->log, "Cannot find body of object %s\n%m", cdh_ObjidToString(NULL, ob.oid, 0), sts);
}
else
{
if
(
dbs_dAlign
(
iop
->
op
->
g
.
size
)
<
ob
.
size
)
{
errh_LogError
(
&
cp
->
log
,
"Data beyond size of body, Objid %s"
,
cdh_ObjidToString
(
NULL
,
ob
.
oid
,
0
));
...
...
@@ -557,12 +558,14 @@ loadSectObject (
if
(
!
pdr_dbs_sObject
(
&
pdrs
,
&
oh
))
pwr_Return
(
NO
,
sts
,
INI__XDR
);
}
if
(
cdh_ObjidIsNull
(
oh
.
oid
))
printf
(
"Load file is corrupt: %s
\n
"
,
vp
->
filename
);
if
(
oh
.
cid
==
pwr_eClass_Node
&&
oh
.
oid
.
vid
==
cp
->
node
.
nid
)
cp
->
node
.
nod_oid
=
oh
.
oid
;
/* This is the node object. */
if
(
oh
.
flags
.
b
.
devOnly
)
{
//
continue;
continue
;
}
op
=
ivol_LoadObject
(
sts
,
vp
,
&
oh
,
vol_mLink_load
);
...
...
@@ -614,6 +617,9 @@ reloadSectObject (
if
(
oh
.
cid
==
pwr_eClass_Node
&&
oh
.
oid
.
vid
==
cp
->
node
.
nid
)
cp
->
node
.
nod_oid
=
oh
.
oid
;
/* This is the node object. */
if
(
oh
.
flags
.
b
.
devOnly
)
continue
;
op
=
reloadObject
(
sts
,
cp
,
vp
,
&
oh
);
if
(
op
==
NULL
)
{
errh_LogError
(
&
cp
->
log
,
"Loading object %s, %s, parent %s
\n
%m"
,
...
...
@@ -1238,7 +1244,7 @@ ini_CheckVolumeFile (
case
dbs_eSect_dir
:
if
(
checkSect
(
sts
,
cp
,
sects
,
dbs_cVersionDirectory
))
readSectFile
(
sts
,
cp
);
readSectFile
(
sts
,
cp
,
vp
);
break
;
case
dbs_eSect_volume
:
if
(
checkSect
(
sts
,
cp
,
sects
,
dbs_cVersionVolume
))
...
...
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