Commit d5231b6b authored by claes's avatar claes

Handling and control of dbs-files in volref

parent 4c76db92
...@@ -74,6 +74,28 @@ dbs_VolRef(pwr_tStatus *sts, pwr_tUInt32 index, dbs_sVolRef *vp, const dbs_sEnv ...@@ -74,6 +74,28 @@ dbs_VolRef(pwr_tStatus *sts, pwr_tUInt32 index, dbs_sVolRef *vp, const dbs_sEnv
return vp; return vp;
} }
dbs_sVolume *
dbs_Volume(pwr_tStatus *sts, dbs_sVolume *vp, const dbs_sEnv *ep)
{
dbs_sSect sect;
fseek(ep->f, ep->file.offset + (dbs_eSect_volume * dbs_dAlign(sizeof(sect))), SEEK_SET);
if (fread(&sect, sizeof(sect), 1, ep->f) == 0) {
*sts = errno_GetStatus();
return NULL;
}
fseek(ep->f, sect.offset, SEEK_SET);
if (fread(vp, sizeof(*vp), 1, ep->f) == 0) {
*sts = errno_GetStatus();
return NULL;
}
return vp;
}
pwr_tBoolean pwr_tBoolean
dbs_Close(pwr_tStatus *sts, dbs_sEnv *ep) dbs_Close(pwr_tStatus *sts, dbs_sEnv *ep)
{ {
...@@ -478,11 +500,6 @@ dbs_nVolRef(pwr_tStatus *sts, const dbs_sMenv *mep) ...@@ -478,11 +500,6 @@ dbs_nVolRef(pwr_tStatus *sts, const dbs_sMenv *mep)
} }
static dbs_sVolRef *findVolref(dbs_sMenv *mep, pwr_tVid vid)
{
return NULL;
}
void void
dbs_Split(pwr_tStatus *sts, dbs_sMenv *mep, char *dirName) dbs_Split(pwr_tStatus *sts, dbs_sMenv *mep, char *dirName)
{ {
......
...@@ -600,6 +600,7 @@ struct dbs_sScObject { ...@@ -600,6 +600,7 @@ struct dbs_sScObject {
%dbs_sEnv *dbs_Open(pwr_tStatus *sts, dbs_sEnv *ep, const char *filename); %dbs_sEnv *dbs_Open(pwr_tStatus *sts, dbs_sEnv *ep, const char *filename);
%#if defined(OS_LINUX) || defined(OS_LYNX) %#if defined(OS_LINUX) || defined(OS_LYNX)
%dbs_sVolRef *dbs_VolRef(pwr_tStatus *sts, pwr_tUInt32 index, dbs_sVolRef *vp, const dbs_sEnv *ep); %dbs_sVolRef *dbs_VolRef(pwr_tStatus *sts, pwr_tUInt32 index, dbs_sVolRef *vp, const dbs_sEnv *ep);
%dbs_sVolume *dbs_Volume(pwr_tStatus *sts, dbs_sVolume *vp, const dbs_sEnv *ep);
%void *dbs_Address(pwr_tStatus*, const dbs_sVenv*, dbs_tRef); %void *dbs_Address(pwr_tStatus*, const dbs_sVenv*, dbs_tRef);
%void dbs_Dump(pwr_tStatus*, const dbs_sEnv*); %void dbs_Dump(pwr_tStatus*, const dbs_sEnv*);
%dbs_tRef dbs_InDbs(pwr_tStatus*, const dbs_sEnv*, void*, pwr_tUInt32); %dbs_tRef dbs_InDbs(pwr_tStatus*, const dbs_sEnv*, void*, pwr_tUInt32);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment