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
e4736342
Commit
e4736342
authored
Mar 31, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed layout of backup-file again.
parent
5c5015e4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
17 deletions
+30
-17
src/exe/rt_bck/src/rt_bck.c
src/exe/rt_bck/src/rt_bck.c
+11
-7
src/lib/rt/src/rt_bck_load.c
src/lib/rt/src/rt_bck_load.c
+9
-9
src/lib/rt/src/rt_bckdef.h
src/lib/rt/src/rt_bckdef.h
+10
-1
No files found.
src/exe/rt_bck/src/rt_bck.c
View file @
e4736342
/*
/*
* Proview $Id: rt_bck.c,v 1.1
1 2008-03-27 09:58:21
claes Exp $
* Proview $Id: rt_bck.c,v 1.1
2 2008-03-31 13:47:39
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -120,7 +120,7 @@ pdebug ()
...
@@ -120,7 +120,7 @@ pdebug ()
typedef
struct
{
typedef
struct
{
BCK_CYCLEHEAD_STRUCT
cyclehead
;
BCK_CYCLEHEAD_STRUCT
cyclehead
;
struct
{
struct
{
bck_t_
data
header
datahead
;
bck_t_
write
header
datahead
;
char
data
[
1
];
char
data
[
1
];
}
segment
[
1
];
}
segment
[
1
];
}
BCK_WRTBLK_STRUCT
;
}
BCK_WRTBLK_STRUCT
;
...
@@ -901,7 +901,7 @@ bck_insert_listentry (
...
@@ -901,7 +901,7 @@ bck_insert_listentry (
blep
->
next
=
blhp
->
first
;
blep
->
next
=
blhp
->
first
;
blhp
->
first
=
blep
;
blhp
->
first
=
blep
;
blhp
->
cyclehead
.
length
+=
sizeof
(
bck_t_
data
header
)
+
attrref
->
Size
+
blhp
->
cyclehead
.
length
+=
sizeof
(
bck_t_
write
header
)
+
attrref
->
Size
+
blep
->
datablk
.
head
.
namesize
+
1
;
blep
->
datablk
.
head
.
namesize
+
1
;
blhp
->
cyclehead
.
segments
++
;
blhp
->
cyclehead
.
segments
++
;
...
@@ -1179,7 +1179,7 @@ void *bck_coll_process (
...
@@ -1179,7 +1179,7 @@ void *bck_coll_process (
BCK_WRTBLK_STRUCT
*
wrtblk
;
BCK_WRTBLK_STRUCT
*
wrtblk
;
BCK_LISTHEAD
*
bcklist
;
BCK_LISTHEAD
*
bcklist
;
BCK_LISTENTRY
*
blep
;
BCK_LISTENTRY
*
blep
;
bck_t_
data
header
*
dhp
;
bck_t_
write
header
*
dhp
;
char
*
p
;
/* data pointer */
char
*
p
;
/* data pointer */
pwr_tUInt32
sts
;
pwr_tUInt32
sts
;
pwr_sClass_Backup
*
bckp
;
pwr_sClass_Backup
*
bckp
;
...
@@ -1288,9 +1288,13 @@ void *bck_coll_process (
...
@@ -1288,9 +1288,13 @@ void *bck_coll_process (
/* Copy data header */
/* Copy data header */
dhp
=
(
bck_t_
data
header
*
)
p
;
/* dhp points to data header */
dhp
=
(
bck_t_
write
header
*
)
p
;
/* dhp points to data header */
p
+=
sizeof
*
dhp
;
/* p points to data part */
p
+=
sizeof
*
dhp
;
/* p points to data part */
*
dhp
=
blep
->
datablk
.
head
;
dhp
->
objid
=
blep
->
datablk
.
head
.
attrref
.
Objid
;
dhp
->
class
=
blep
->
datablk
.
head
.
class
;
dhp
->
dynamic
=
blep
->
datablk
.
head
.
dynamic
;
dhp
->
namesize
=
blep
->
datablk
.
head
.
namesize
;
dhp
->
size
=
blep
->
datablk
.
head
.
attrref
.
Size
;
/* Write name */
/* Write name */
...
@@ -1312,7 +1316,7 @@ void *bck_coll_process (
...
@@ -1312,7 +1316,7 @@ void *bck_coll_process (
}
/* Backup object is still there */
}
/* Backup object is still there */
UNLOCK
;
UNLOCK
;
p
+=
dhp
->
attrref
.
S
ize
;
p
+=
dhp
->
s
ize
;
blep
=
blep
->
next
;
blep
=
blep
->
next
;
}
}
...
...
src/lib/rt/src/rt_bck_load.c
View file @
e4736342
/*
/*
* Proview $Id: rt_bck_load.c,v 1.
5 2008-03-27 09:59:57
claes Exp $
* Proview $Id: rt_bck_load.c,v 1.
6 2008-03-31 13:47:00
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -77,7 +77,7 @@ bck_LoadBackup ()
...
@@ -77,7 +77,7 @@ bck_LoadBackup ()
BCK_FILEHEAD_STRUCT
fh
;
/* File header */
BCK_FILEHEAD_STRUCT
fh
;
/* File header */
BCK_CYCLEHEAD_STRUCT
ch
;
BCK_CYCLEHEAD_STRUCT
ch
;
BCK_DATAHEAD_STRUCT
dh_old
;
BCK_DATAHEAD_STRUCT
dh_old
;
bck_t_
dataheader
dh
;
bck_t_
writeheader
dh
;
pwr_tUInt32
c
;
pwr_tUInt32
c
;
pwr_tUInt32
d
;
pwr_tUInt32
d
;
char
*
strp
;
char
*
strp
;
...
@@ -194,8 +194,8 @@ bck_LoadBackup ()
...
@@ -194,8 +194,8 @@ bck_LoadBackup ()
csts
=
fread
(
namep
,
dh
.
namesize
+
1
,
1
,
f
);
csts
=
fread
(
namep
,
dh
.
namesize
+
1
,
1
,
f
);
}
else
}
else
namep
=
NULL
;
namep
=
NULL
;
datap
=
malloc
(
dh
.
attrref
.
S
ize
);
datap
=
malloc
(
dh
.
s
ize
);
csts
=
fread
(
datap
,
dh
.
attrref
.
S
ize
,
1
,
f
);
csts
=
fread
(
datap
,
dh
.
s
ize
,
1
,
f
);
}
}
if
(
csts
==
0
)
{
if
(
csts
==
0
)
{
SET_ERRNO_STS
;
SET_ERRNO_STS
;
...
@@ -210,20 +210,20 @@ bck_LoadBackup ()
...
@@ -210,20 +210,20 @@ bck_LoadBackup ()
strp
=
strchr
(
namep
,
'.'
);
/* always is a full object! */
strp
=
strchr
(
namep
,
'.'
);
/* always is a full object! */
if
(
strp
!=
NULL
)
*
strp
=
'\0'
;
/* Just make sure... */
if
(
strp
!=
NULL
)
*
strp
=
'\0'
;
/* Just make sure... */
sts
=
gdh_CreateObject
(
namep
,
dh
.
class
,
dh
.
attrref
.
S
ize
,
sts
=
gdh_CreateObject
(
namep
,
dh
.
class
,
dh
.
s
ize
,
&
objid
,
dh
.
attrref
.
O
bjid
,
0
,
pwr_cNObjid
);
&
objid
,
dh
.
o
bjid
,
0
,
pwr_cNObjid
);
if
(
strp
!=
NULL
)
*
strp
=
'.'
;
if
(
strp
!=
NULL
)
*
strp
=
'.'
;
if
(
ODD
(
sts
))
if
(
ODD
(
sts
))
sts
=
gdh_SetObjectInfo
(
namep
,
datap
,
dh
.
attrref
.
S
ize
);
sts
=
gdh_SetObjectInfo
(
namep
,
datap
,
dh
.
s
ize
);
}
/* Dynamic object */
}
/* Dynamic object */
else
{
else
{
sts
=
gdh_ObjidToName
(
dh
.
attrref
.
O
bjid
,
objectname
,
sizeof
(
objectname
),
sts
=
gdh_ObjidToName
(
dh
.
o
bjid
,
objectname
,
sizeof
(
objectname
),
cdh_mNName
);
cdh_mNName
);
if
(
ODD
(
sts
))
{
if
(
ODD
(
sts
))
{
strcat
(
objectname
,
namep
);
strcat
(
objectname
,
namep
);
sts
=
gdh_SetObjectInfo
(
objectname
,
datap
,
dh
.
attrref
.
S
ize
);
sts
=
gdh_SetObjectInfo
(
objectname
,
datap
,
dh
.
s
ize
);
}
}
}
}
}
/* valid segment */
}
/* valid segment */
...
...
src/lib/rt/src/rt_bckdef.h
View file @
e4736342
/*
/*
* Proview $Id: rt_bckdef.h,v 1.
3 2008-03-27 09:59:57
claes Exp $
* Proview $Id: rt_bckdef.h,v 1.
4 2008-03-31 13:47:00
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -107,6 +107,15 @@ typedef struct {
...
@@ -107,6 +107,15 @@ typedef struct {
pwr_tInt16
namesize
;
/* Name of attribute [.attribute] */
pwr_tInt16
namesize
;
/* Name of attribute [.attribute] */
}
bck_t_dataheader
;
}
bck_t_dataheader
;
typedef
struct
{
pwr_tObjid
objid
;
/* Objid for the object */
pwr_tClassId
class
;
/* Class of object */
pwr_tBoolean
valid
;
/* Validity flag */
pwr_tBoolean
dynamic
;
/* Dynamic object */
pwr_tInt16
namesize
;
/* Size of name of attribute [.attribute] */
pwr_tUInt32
size
;
/* Size of data */
}
bck_t_writeheader
;
#ifdef OS_ELN
#ifdef OS_ELN
...
...
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