Commit cb3e0846 authored by lw's avatar lw

*** empty log message ***

parent 11a2d755
...@@ -821,3 +821,11 @@ dbs_AlignedRead(pwr_tStatus *sts, void *buf, pwr_tUInt32 size, const dbs_sEnv *e ...@@ -821,3 +821,11 @@ dbs_AlignedRead(pwr_tStatus *sts, void *buf, pwr_tUInt32 size, const dbs_sEnv *e
return YES; return YES;
} }
void
dbs_GetVolumeName(pwr_tStatus *sts, dbs_sEnv *ep, char *name)
{
dbs_sVolume *vp = (dbs_sVolume *)(ep->base + ep->sect[dbs_eSect_volume].offset);
strcpy(name, vp->name);
}
...@@ -569,6 +569,7 @@ struct dbs_sName { ...@@ -569,6 +569,7 @@ struct dbs_sName {
%dbs_sObject *dbs_Previous(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op); %dbs_sObject *dbs_Previous(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op);
%dbs_sObject *dbs_Child(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op, char *name); %dbs_sObject *dbs_Child(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op, char *name);
%dbs_sObject *dbs_Ancestor(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op); %dbs_sObject *dbs_Ancestor(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op);
%void dbs_GetVolumeName(pwr_tStatus *sts, dbs_sEnv *ep, char *name);
% %
% %
%#ifdef __cplusplus %#ifdef __cplusplus
......
...@@ -32,6 +32,7 @@ wb_vrepdbs::dbsenv() ...@@ -32,6 +32,7 @@ wb_vrepdbs::dbsenv()
throw wb_error(sts); throw wb_error(sts);
} }
m_isDbsenvLoaded = true; m_isDbsenvLoaded = true;
dbs_GetVolumeName(&sts, &m_dbsenv, m_name);
} else { } else {
ep = &m_dbsenv; ep = &m_dbsenv;
} }
...@@ -50,7 +51,7 @@ wb_vrepdbs::load() ...@@ -50,7 +51,7 @@ wb_vrepdbs::load()
wb_orep * wb_orep *
wb_vrepdbs::object(pwr_tStatus *sts, pwr_tOid oid) wb_vrepdbs::object(pwr_tStatus *sts, pwr_tOid oid)
{ {
dbs_sObject *op = dbs_OidToObject(sts, &m_dbsenv, oid); dbs_sObject *op = dbs_OidToObject(sts, dbsenv(), oid);
if (op == 0) if (op == 0)
return 0; return 0;
...@@ -72,11 +73,11 @@ wb_vrepdbs::object(pwr_tStatus *sts, wb_orep *parent, wb_name name) ...@@ -72,11 +73,11 @@ wb_vrepdbs::object(pwr_tStatus *sts, wb_orep *parent, wb_name name)
n.poix = parent->oix(); n.poix = parent->oix();
strcpy(n.normname, name.normName(cdh_mName_object)); strcpy(n.normname, name.normName(cdh_mName_object));
dbs_sName *nrp = dbs_Bfind(&sts, &m_dbsenv, m_dbs.name_bt, &n, dbs_CompName); dbs_sName *nrp = dbs_Bfind(&sts, dbsenv(), m_dbs.name_bt, &n, dbs_CompName);
if (!nrp) if (!nrp)
return 0; return 0;
dbs_Object *o = dbs_Address(&sts, &m_dbsenv, nrp->ref); dbs_Object *o = dbs_Address(&sts, dbsenv(), nrp->ref);
if (!o) if (!o)
return 0; return 0;
...@@ -167,7 +168,7 @@ bool wb_vrepdbs::writeBody() ...@@ -167,7 +168,7 @@ bool wb_vrepdbs::writeBody()
wb_orep *wb_vrepdbs::ancestor(pwr_tStatus *sts, wb_orep *o) wb_orep *wb_vrepdbs::ancestor(pwr_tStatus *sts, wb_orep *o)
{ {
dbs_sObject *op = dbs_Ancestor(sts, &m_dbsenv, ((wb_orepdbs *)o)->o()); dbs_sObject *op = dbs_Ancestor(sts, dbsenv(), ((wb_orepdbs *)o)->o());
if (op == 0) if (op == 0)
return 0; return 0;
...@@ -177,7 +178,7 @@ wb_orep *wb_vrepdbs::ancestor(pwr_tStatus *sts, wb_orep *o) ...@@ -177,7 +178,7 @@ wb_orep *wb_vrepdbs::ancestor(pwr_tStatus *sts, wb_orep *o)
wb_orep *wb_vrepdbs::parent(pwr_tStatus *sts, wb_orep *o) wb_orep *wb_vrepdbs::parent(pwr_tStatus *sts, wb_orep *o)
{ {
dbs_sObject *op = dbs_Parent(sts, &m_dbsenv, ((wb_orepdbs *)o)->o()); dbs_sObject *op = dbs_Parent(sts, dbsenv(), ((wb_orepdbs *)o)->o());
if (op == 0) if (op == 0)
return 0; return 0;
...@@ -187,7 +188,7 @@ wb_orep *wb_vrepdbs::parent(pwr_tStatus *sts, wb_orep *o) ...@@ -187,7 +188,7 @@ wb_orep *wb_vrepdbs::parent(pwr_tStatus *sts, wb_orep *o)
wb_orep *wb_vrepdbs::after(pwr_tStatus *sts, wb_orep *o) wb_orep *wb_vrepdbs::after(pwr_tStatus *sts, wb_orep *o)
{ {
dbs_sObject *op = dbs_After(sts, &m_dbsenv, ((wb_orepdbs *)o)->o()); dbs_sObject *op = dbs_After(sts, dbsenv(), ((wb_orepdbs *)o)->o());
if (op == 0) if (op == 0)
return 0; return 0;
...@@ -197,7 +198,7 @@ wb_orep *wb_vrepdbs::after(pwr_tStatus *sts, wb_orep *o) ...@@ -197,7 +198,7 @@ wb_orep *wb_vrepdbs::after(pwr_tStatus *sts, wb_orep *o)
wb_orep *wb_vrepdbs::before(pwr_tStatus *sts, wb_orep *o) wb_orep *wb_vrepdbs::before(pwr_tStatus *sts, wb_orep *o)
{ {
dbs_sObject *op = dbs_Before(sts, &m_dbsenv, ((wb_orepdbs *)o)->o()); dbs_sObject *op = dbs_Before(sts, dbsenv(), ((wb_orepdbs *)o)->o());
if (op == 0) if (op == 0)
return 0; return 0;
...@@ -207,7 +208,7 @@ wb_orep *wb_vrepdbs::before(pwr_tStatus *sts, wb_orep *o) ...@@ -207,7 +208,7 @@ wb_orep *wb_vrepdbs::before(pwr_tStatus *sts, wb_orep *o)
wb_orep *wb_vrepdbs::first(pwr_tStatus *sts, wb_orep *o) wb_orep *wb_vrepdbs::first(pwr_tStatus *sts, wb_orep *o)
{ {
dbs_sObject *op = dbs_First(sts, &m_dbsenv, ((wb_orepdbs *)o)->o()); dbs_sObject *op = dbs_First(sts, dbsenv(), ((wb_orepdbs *)o)->o());
if (op == 0) if (op == 0)
return 0; return 0;
...@@ -217,7 +218,7 @@ wb_orep *wb_vrepdbs::first(pwr_tStatus *sts, wb_orep *o) ...@@ -217,7 +218,7 @@ wb_orep *wb_vrepdbs::first(pwr_tStatus *sts, wb_orep *o)
wb_orep *wb_vrepdbs::child(pwr_tStatus *sts, wb_orep *o, char *name) wb_orep *wb_vrepdbs::child(pwr_tStatus *sts, wb_orep *o, char *name)
{ {
dbs_sObject *op = dbs_Child(sts, &m_dbsenv, ((wb_orepdbs *)o)->o(), name); dbs_sObject *op = dbs_Child(sts, dbsenv(), ((wb_orepdbs *)o)->o(), name);
if (op == 0) if (op == 0)
return 0; return 0;
...@@ -227,7 +228,7 @@ wb_orep *wb_vrepdbs::child(pwr_tStatus *sts, wb_orep *o, char *name) ...@@ -227,7 +228,7 @@ wb_orep *wb_vrepdbs::child(pwr_tStatus *sts, wb_orep *o, char *name)
wb_orep *wb_vrepdbs::last(pwr_tStatus *sts, wb_orep *o) wb_orep *wb_vrepdbs::last(pwr_tStatus *sts, wb_orep *o)
{ {
dbs_sObject *op = dbs_Last(sts, &m_dbsenv, ((wb_orepdbs *)o)->o()); dbs_sObject *op = dbs_Last(sts, dbsenv(), ((wb_orepdbs *)o)->o());
if (op == 0) if (op == 0)
return 0; return 0;
...@@ -237,7 +238,7 @@ wb_orep *wb_vrepdbs::last(pwr_tStatus *sts, wb_orep *o) ...@@ -237,7 +238,7 @@ wb_orep *wb_vrepdbs::last(pwr_tStatus *sts, wb_orep *o)
wb_orep *wb_vrepdbs::next(pwr_tStatus *sts, wb_orep *o) wb_orep *wb_vrepdbs::next(pwr_tStatus *sts, wb_orep *o)
{ {
dbs_sObject *op = dbs_Next(sts, &m_dbsenv, ((wb_orepdbs *)o)->o()); dbs_sObject *op = dbs_Next(sts, dbsenv(), ((wb_orepdbs *)o)->o());
if (op == 0) if (op == 0)
return 0; return 0;
...@@ -247,7 +248,7 @@ wb_orep *wb_vrepdbs::next(pwr_tStatus *sts, wb_orep *o) ...@@ -247,7 +248,7 @@ wb_orep *wb_vrepdbs::next(pwr_tStatus *sts, wb_orep *o)
wb_orep *wb_vrepdbs::previous(pwr_tStatus *sts, wb_orep *o) wb_orep *wb_vrepdbs::previous(pwr_tStatus *sts, wb_orep *o)
{ {
dbs_sObject *op = dbs_Previous(sts, &m_dbsenv, ((wb_orepdbs *)o)->o()); dbs_sObject *op = dbs_Previous(sts, dbsenv(), ((wb_orepdbs *)o)->o());
if (op == 0) if (op == 0)
return 0; return 0;
......
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