Compare commits

...

6 Commits

Author SHA1 Message Date
deadwood 1a3030c56e When building per opener base libraries, don't add global library bases
Previously the condition was for libraries that have relative linker libs,
but linker libs are not influencing libraries themselves, so the condition
was weird and there was no explanation why such functionality was
introduced.
2024-04-22 15:31:14 +02:00
deadwood e156fc7832 Add test for special case of link stubs when library has noincludes
This is a special case in genmodule. This test purpose is to show this
use case continues working.
2024-04-22 15:29:00 +02:00
deadwood a8d3a4aee8 Add test for calling reg function from stack function inside library
Using __aros_getbase_PeropenerBase and proto/peropener.h. This test purpose
is to test that functionality changed in previous commit continues
working.
2024-04-22 15:27:57 +02:00
deadwood 9513d8ca08 ABI: Use a different symbol to pass library base to functions in headers
Prior to this change, __aros_getbase_XXXX was used and was re-defined in
proto/xxxx.h to either library base of relative offset. However
__aros_getbase_XXXX was an actual function often used inside of library.
The effect was that if proto/xxxx.h was included in the library xxxx
itself, the __aros_getbase_XXXX was redefined, for example in per opener
library instead of reading R12 (x86_64 ABI) it was reading (local)
library base, causing struct Library *ABase = __aros__getbase_ABase() to
become struct Library *ABase = ABase and a "silent" NO-OP

This change changes the symbol used in library call to __LIB_LIBBASE and
__aros_getbase_XXXX is no longer re-defined in proto/xxxx.h

Additionally for cases there inline/xxxx.h or defines/xxxx.h is included
instead of proto/xxxx.h, __LIB_LIBBASE is defined to __aros_getbase_XXXX
so that proper implementation from linklib is pulled in. Same goes for
stub functions in "noincludes" case.

Note: this commit does not change client-side behavior as documented in
ABI_SPECIFICATION. It only changes the name of the symbol used.
2024-04-22 15:10:29 +02:00
deadwood 77cc2e7f64 Remove MUI floppy disk image spec from file system text
Done on request to synchronize look & feel
2024-04-17 10:42:55 +02:00
Kalamatee 2e6303aa2d Read the filesystem ID from the doslist volume, preferably. 2024-04-17 10:02:42 +02:00
15 changed files with 301 additions and 65 deletions

View File

@ -12,26 +12,26 @@ Caller-side (Regular caller: program or library storing called library base in v
Type of call How base is fetched at caller ==> How base and arguments are passed to library
REGCALL
inline
regular Passed to inline function as result of __aros_getbase_LibBase() R12 for base / SysV x86_64 ABI for arguments
regular Passed to inline function as value of __LIB_LIBBASE R12 for base / SysV x86_64 ABI for arguments
defined by default to (LibBase) global or local variable.
(LibBase) can be re-defined by caller.
define
regular Passed to macro as result of __aros_getbase_LibBase() R12 for base / SysV x86_64 ABI for arguments
regular Passed to macro as value of __LIB_LIBBASE R12 for base / SysV x86_64 ABI for arguments
defined by default to (LibBase) global or local variable.
(LibBase) cab be re-defined by caller.
linklib
regular Fetched in stub function as results of R12 for base / SysV x86_64 ABI for arguments
__aros_getbase_LibBase() which is compiled as (LibBase) global
regular Fetched in stub function as value of __LIB_LIBBASE R12 for base / SysV x86_64 ABI for arguments
which is compiled as (LibBase) global
variable. Re-defining (LibBase) by caller has no effect, as
stub function is already compiled.
STACKCALL
linklib
non-varargs
regular Fetched in stub function as results of R12 for base / SysV x86_64 ABI for arguments
__aros_getbase_LibBase() which is compiled as (LibBase) global
regular Fetched in stub function as value of __LIB_LIBBASE R12 for base / SysV x86_64 ABI for arguments
which is compiled as (LibBase) global
variable. Re-defining (LibBase) by caller has no effect, as
stub function is already compiled.
@ -102,15 +102,15 @@ REGCALL
base-relative Disabled Disabled
define
base-relative Passed to macro as result of __aros_getbase_LibBase() R12 for base / SysV x86_64 ABI for arguments
base-relative Passed to macro as value of __LIB_LIBBASE R12 for base / SysV x86_64 ABI for arguments
defined by default as result of __aros_getoffsettable() offsetted
by __aros_rellib_offset_LibBase global constant. Caller must
implement or define __aros_getoffsettable() returning
caller's library base.
linklib
base-relative Fetched in stub function as results of R12 for base / SysV x86_64 ABI for arguments
__aros_getbase_LibBase() which is compiled as result of
base-relative Fetched in stub function as value of __LIB_LIBBASE R12 for base / SysV x86_64 ABI for arguments
which is compiled as result of
__aros_getoffsettable() offsetted by __aros_rellib_offset_LibBase
global constant. Caller must implement __aros_getoffsettable()
returning caller's library base.
@ -118,8 +118,8 @@ REGCALL
STACKCALL
linklib
non-varargs
base-relative Fetched in stub function as results of R12 for base / SysV x86_64 ABI for arguments
__aros_getbase_LibBase() which is compiled as result of
base-relative Fetched in stub function as value of __LIB_LIBBASE R12 for base / SysV x86_64 ABI for arguments
which is compiled as result of
__aros_getoffsettable() offsetted by __aros_rellib_offset_LibBase
global constant. Caller must implement __aros_getoffsettable()
returning caller's library base.

View File

@ -0,0 +1,45 @@
/*
Copyright (C) 2024, The AROS Development Team. All rights reserved.
$Id$
*/
#include <proto/exec.h>
#include <proto/dos.h>
#include <CUnit/CUnitCI.h>
CU_SUITE_SETUP()
{
return CUE_SUCCESS;
}
CU_SUITE_TEARDOWN()
{
return CUE_SUCCESS;
}
CU_TEST_SETUP()
{
}
CU_TEST_TEARDOWN()
{
}
void RegSetValue(LONG v);
int StackGetValue();
void test_basic(void)
{
RegSetValue(5);
CU_ASSERT_EQUAL(StackGetValue(), 5);
}
int main(int argc, char** argv)
{
CU_CI_DEFINE_SUITE("Library_Noincludes_Suite", __cu_suite_setup, __cu_suite_teardown, __cu_test_setup, __cu_test_teardown);
CUNIT_CI_TEST(test_basic);
return CU_CI_RUN_SUITES();
}

View File

@ -0,0 +1,51 @@
/*
Copyright Š 2024, The AROS Development Team. All rights reserved.
$Id$
*/
#include <proto/exec.h>
#include <proto/peropener.h>
#include <CUnit/CUnitCI.h>
struct Library *PeropenerBase = NULL;
CU_SUITE_SETUP()
{
return CUE_SUCCESS;
}
CU_SUITE_TEARDOWN()
{
return CUE_SUCCESS;
}
CU_TEST_SETUP()
{
}
CU_TEST_TEARDOWN()
{
}
void test_stack_call_that_goes_internally_through_reg_call()
{
CU_ASSERT_EQUAL_FATAL(PeropenerBase, NULL);
PeropenerBase = OpenLibrary("peropener.library", 0L);
CU_ASSERT_NOT_EQUAL_FATAL(PeropenerBase, NULL);
PeropenerSetValueStackThroughInternalReg(5);
CU_ASSERT_EQUAL(PeropenerGetValueReg(), 5);
CloseLibrary(PeropenerBase);
PeropenerBase = NULL;
}
int main(int argc, char** argv)
{
CU_CI_DEFINE_SUITE("Library_Peropener_IntraLib_Suite", __cu_suite_setup, __cu_suite_teardown, __cu_test_setup, __cu_test_teardown);
CUNIT_CI_TEST(test_stack_call_that_goes_internally_through_reg_call);
return CU_CI_RUN_SUITES();
}

View File

@ -13,7 +13,8 @@ include $(SRCDIR)/config/aros.cfg
#MM- test-library-clean : \
#MM test-library-singlelib-clean \
#MM test-library-peropenerlib-clean \
#MM test-library-userellib-clean
#MM test-library-userellib-clean \
#MM test-library-noincludeslib-clean
#MM- test-cunit : test-library-cunit
@ -41,9 +42,17 @@ USER_LDFLAGS := -L$(TARGETDIR)/$(AROS_DIR_DEVELOPMENT)/lib
files="singlelib" \
prefix=$(TARGETDIR)
%build_module mmake=test-library-noincludeslib \
modname=noincludes modtype=library \
files="noincludeslib" \
prefix=$(TARGETDIR)
FILES := peropenervalue peropenernolib peropenernamechange peropenerinit peropenershareable \
peropenervalue_intralib
%build_module mmake=test-library-peropenerlib \
modname=peropener modtype=library \
files="peropenervalue peropenernolib peropenernamechange peropenerinit peropenershareable" \
files="$(FILES)" \
linklibfiles="peropenervalue_linklib" \
prefix=$(TARGETDIR)
@ -63,6 +72,7 @@ USER_CFLAGS := $(CFLAGS_NO_BUILTIN)
USER_LDFLAGS +=
#MM test-library-userel-cunit : linklibs-cunit test-library-userellib test-library-singlelib test-library-peropenerlib
#MM test-library-noincludes-cunit : linklibs-cunit test-library-noincludeslib
%build_prog mmake=test-library-single-autoopen-cunit \
progname=cunit-library-single-autoopen targetdir=$(CUNITEXEDIR) \
@ -72,6 +82,10 @@ USER_LDFLAGS +=
progname=cunit-library-single targetdir=$(CUNITEXEDIR) \
uselibs="single cunit"
%build_prog mmake=test-library-noincludes-cunit \
progname=cunit-library-noincludes targetdir=$(CUNITEXEDIR) \
uselibs="noincludes cunit"
%build_prog mmake=test-library-userel-cunit \
progname=cunit-library-userel targetdir=$(CUNITEXEDIR) \
uselibs="userel peropener cunit"
@ -84,6 +98,10 @@ USER_LDFLAGS +=
progname=cunit-library-peropener-varsglobal targetdir=$(CUNITEXEDIR) \
uselibs="peropener cunit"
%build_prog mmake=test-library-peropener-intralib-cunit \
progname=cunit-library-peropener-intralib targetdir=$(CUNITEXEDIR) \
uselibs="peropener cunit"
FILES := cunit-library-single-global \
cunit-library-single-global-reg-define \
cunit-library-single-global-reg-inline \
@ -148,7 +166,9 @@ USER_CPPFLAGS :=
#MM test-library-peropener-local-cunit \
#MM test-library-peropener-relative-cunit \
#MM test-library-peropener-shareable-cunit \
#MM test-library-peropener-varsglobal-cunit
#MM test-library-peropener-varsglobal-cunit \
#MM test-library-peropener-intralib-cunit \
#MM test-library-noincludes-cunit
#MM- test-library-cunit-quick : \
#MM test-library-userel-cunit-quick \
@ -160,6 +180,8 @@ USER_CPPFLAGS :=
#MM test-library-peropener-local-cunit-quick \
#MM test-library-peropener-relative-cunit-quick \
#MM test-library-peropener-shareable-cunit-quick \
#MM test-library-peropener-varsglobal-cunit-quick
#MM test-library-peropener-varsglobal-cunit-quick \
#MM test-library-peropener-intralib-cunit-quick \
#MM test-library-noincludes-cunit-quick
%common

View File

@ -0,0 +1,13 @@
##begin config
version 1.0
options noincludes
##end config
##begin cdefprivate
##end cdefprivate
##begin functionlist
void RegSetValue(LONG v) (D0)
int StackGetValue()
##end functionlist

View File

@ -0,0 +1,35 @@
/*
Copyright (C) 2024, The AROS Development Team. All rights reserved.
Desc:
*/
#include <stdarg.h>
#include <exec/types.h>
#include <aros/libcall.h>
#include <proto/dos.h>
#include <proto/exec.h>
#include LC_LIBDEFS_FILE
#include "singlebase.h"
LONG val;
AROS_LH1(void, RegSetValue,
AROS_LHA(LONG, v, D0),
struct Library *, NoincludesBase, 5, Noincludes
)
{
AROS_LIBFUNC_INIT
val = v;
AROS_LIBFUNC_EXIT
}
int StackGetValue()
{
return val;
}

View File

@ -1,5 +1,5 @@
##begin config
version 3.0
version 4.0
libbasetype struct PeropenerBase
options peropenerbase,rellinklib
##end config
@ -26,4 +26,5 @@ int PeropenerGetGlobalPeropenerValueReg() ()
void Peropener_AllowShareable(struct Library *base)
struct Library * Peropener_GetShareable(struct Library *base)
void Peropener_DisallowShareable(struct Library *base)
void PeropenerSetValueStackThroughInternalReg(int v)
##end functionlist

View File

@ -0,0 +1,14 @@
/*
Copyright (C) 2024, The AROS Development Team. All rights reserved.
*/
#include <proto/peropener.h>
/* This file contains logic for testing library calls from withint itself */
void PeropenerSetValueStackThroughInternalReg(int value)
{
struct Library *PeropenerBase = __aros_getbase_PeropenerBase();
PeropenerSetValueReg(value);
}

View File

@ -23,6 +23,8 @@ If NOT WARN
Execute S/Test cunit/library/cunit-library-peropener-relative ;Library_Peropener_Relative_Suite
Execute S/Test cunit/library/cunit-library-peropener-shareable ;Library_Peropener_Shareable_Suite
Execute S/Test cunit/library/cunit-library-peropener-varsglobal ;Library_Peropener_VarsGlobal_Suite
Execute S/Test cunit/library/cunit-library-peropener-intralib ;Library_Peropener_IntraLib_Suite
Execute S/Test cunit/library/cunit-library-noincludes ;Library_Noincludes_Suite
EndIf
; Perform basic "exec.library" unit tests...

View File

@ -1,5 +1,5 @@
/*
Copyright (C) 1995-2017, The AROS Development Team. All rights reserved.
Copyright (C) 1995-2020, The AROS Development Team. All rights reserved.
Function to write defines/modulename.h. Part of genmodule.
*/
@ -42,6 +42,19 @@ void writeincdefines(struct config *cfg)
"\n",
cfg->includenameupper, cfg->includenameupper, banner, cfg->modulename
);
fprintf(out,
"#if !defined(__%s_LIBBASE)\n"
"#define __%s_LIBBASE __aros_getbase_%s()\n"
"#endif\n"
"#ifndef __aros_getbase_%s\n"
"extern %s__aros_getbase_%s(void);\n"
"#endif\n"
"\n",
cfg->includenameupper,
cfg->includenameupper, cfg->libbase,
cfg->libbase,
cfg->libbasetypeptrextern, cfg->libbase
);
fprintf(out,
"__BEGIN_DECLS\n"
"\n"
@ -293,8 +306,8 @@ writedefineregister(FILE *out, struct functionhead *funclistit, struct config *c
fprintf(out, ", ");
fprintf(out, "arg%d", count);
}
fprintf(out, ") \\\n __%s_WB(__aros_getbase_%s()",
funclistit->name, cfg->libbase
fprintf(out, ") \\\n __%s_WB(__%s_LIBBASE",
funclistit->name, cfg->includenameupper
);
for (arglistit = funclistit->arguments, count = 1;
arglistit != NULL;
@ -428,9 +441,9 @@ writedefinevararg(FILE *out, struct functionhead *funclistit, struct config *cfg
"...) __%s_WB(",
varargname
);
fprintf(out, "(%s)__aros_getbase_%s(), ",
fprintf(out, "(%s)__%s_LIBBASE, ",
cfg->libbasetypeptrextern,
cfg->libbase);
cfg->includenameupper);
for (arglistit = funclistit->arguments, count = 1;
arglistit != NULL && arglistit->next != NULL && arglistit->next->next != NULL;
arglistit = arglistit->next, count++
@ -506,9 +519,9 @@ writedefinevararg(FILE *out, struct functionhead *funclistit, struct config *cfg
" __inline_%s_%s(",
cfg->basename, varargname
);
fprintf(out, "(%s)__aros_getbase_%s(), ",
fprintf(out, "(%s)__%s_LIBBASE, ",
cfg->libbasetypeptrextern,
cfg->libbase);
cfg->includenameupper);
for (arglistit = funclistit->arguments, count = 1;
arglistit != NULL && arglistit->next != NULL && arglistit->next->next != NULL;
arglistit = arglistit->next, count++

View File

@ -43,6 +43,19 @@ void writeincinline(struct config *cfg)
"\n",
cfg->includenameupper, cfg->includenameupper, banner, cfg->modulename
);
fprintf(out,
"#if !defined(__%s_LIBBASE)\n"
"#define __%s_LIBBASE __aros_getbase_%s()\n"
"#endif\n"
"#ifndef __aros_getbase_%s\n"
"extern %s__aros_getbase_%s(void);\n"
"#endif\n"
"\n",
cfg->includenameupper,
cfg->includenameupper, cfg->libbase,
cfg->libbase,
cfg->libbasetypeptrextern, cfg->libbase
);
freeBanner(banner);
for (funclistit = cfg->funclist; funclistit!=NULL; funclistit = funclistit->next)
@ -309,7 +322,7 @@ writeinlineregister(FILE *out, struct functionhead *funclistit, struct config *c
arglistit = arglistit->next, count++
)
fprintf(out, "(arg%d), ", count);
fprintf(out, "__aros_getbase_%s())\n", cfg->libbase);
fprintf(out, "__%s_LIBBASE)\n", cfg->includenameupper);
}
void
@ -436,9 +449,9 @@ writeinlinevararg(FILE *out, struct functionhead *funclistit, struct config *cfg
" __inline_%s_%s(",
cfg->basename, varargname
);
fprintf(out, "(%s)__aros_getbase_%s(), ",
fprintf(out, "(%s)__%s_LIBBASE, ",
cfg->libbasetypeptrextern,
cfg->libbase);
cfg->includenameupper);
for (arglistit = funclistit->arguments, count = 1;
arglistit != NULL && arglistit->next != NULL && arglistit->next->next != NULL;
arglistit = arglistit->next, count++
@ -515,9 +528,9 @@ writeinlinevararg(FILE *out, struct functionhead *funclistit, struct config *cfg
" __inline_%s_%s(",
cfg->basename, varargname
);
fprintf(out, "(%s)__aros_getbase_%s(), ",
fprintf(out, "(%s)__%s_LIBBASE, ",
cfg->libbasetypeptrextern,
cfg->libbase);
cfg->includenameupper);
for (arglistit = funclistit->arguments, count = 1;
arglistit != NULL && arglistit->next != NULL && arglistit->next->next != NULL;
arglistit = arglistit->next, count++

View File

@ -80,11 +80,11 @@ void writeincproto(struct config *cfg)
fprintf(out,
" #endif\n"
" #endif\n"
" #ifndef __aros_getbase_%s\n"
" #define __aros_getbase_%s() (%s)\n"
" #ifndef __%s_LIBBASE\n"
" #define __%s_LIBBASE (%s)\n"
" #endif\n",
cfg->libbase,
cfg->libbase, cfg->libbase
cfg->includenameupper,
cfg->includenameupper, cfg->libbase
);
if (cfg->options & OPTION_RELLINKLIB)
@ -93,23 +93,29 @@ void writeincproto(struct config *cfg)
" extern const IPTR __aros_rellib_offset_%s;\n"
" #define AROS_RELLIB_OFFSET_%s __aros_rellib_offset_%s\n"
" #define AROS_RELLIB_BASE_%s __aros_rellib_base_%s\n"
" #ifndef __aros_getbase_%s\n"
" #ifndef __%s_LIBBASE\n"
" #ifndef __aros_getoffsettable\n"
" char *__aros_getoffsettable(void);\n"
" #endif\n"
" #define __aros_getbase_%s() (*(%s*)(__aros_getoffsettable()+__aros_rellib_offset_%s))\n"
" #define __%s_LIBBASE (*(%s*)(__aros_getoffsettable()+__aros_rellib_offset_%s))\n"
" #endif\n"
"#endif\n",
cfg->includenameupper,
cfg->libbase,
cfg->includenameupper, cfg->libbase,
cfg->includenameupper, cfg->libbase,
cfg->libbase,
cfg->libbase, cfg->libbasetypeptrextern, cfg->libbase
cfg->includenameupper,
cfg->includenameupper, cfg->libbasetypeptrextern, cfg->libbase
);
fprintf(out, "\n");
fprintf(out,
"#ifndef __aros_getbase_%s\n"
"extern %s__aros_getbase_%s(void);\n"
"#endif\n"
"\n",
cfg->libbase,
cfg->libbasetypeptrextern, cfg->libbase
);
// define name must not start with a digit
// this solves a problem with proto/8svx.h
if (isdigit(cfg->includenameupper[0]))

View File

@ -122,7 +122,7 @@ void writemakefile(struct config *cfg)
fprintf(out, "%s_CPPFLAGS +=", moduleversname);
for (s = cfg->rellibs; s ; s = s->next)
fprintf(out, " -D__%s_RELLIBBASE__", upname(s->s));
if (cfg->options & OPTION_RELLINKLIB)
if (cfg->options & OPTION_DUPBASE)
fprintf(out, " -D__%s_NOLIBBASE__", upname(cfg->modulename));
fprintf(out, "\n");
fprintf(out, "%s_LINKLIBCPPFLAGS +=", moduleversname);

View File

@ -149,10 +149,19 @@ static void writeheader(struct config *cfg, int is_rel, FILE *out)
for (linelistit = cfg->cdefprivatelines; linelistit!=NULL; linelistit = linelistit->next)
fprintf(out, "%s\n", linelistit->s);
fprintf(out, "\n");
fprintf(out,
"\n"
"%s__aros_getbase_%s(void);\n"
"#if !defined(__%s_LIBBASE)\n"
"#define __%s_LIBBASE __aros_getbase_%s()\n"
"#endif\n"
"#ifndef __aros_getbase_%s\n"
"extern %s__aros_getbase_%s(void);\n"
"#endif\n"
"\n",
cfg->includenameupper,
cfg->includenameupper, cfg->libbase,
cfg->libbase,
cfg->libbasetypeptrextern, cfg->libbase
);
}
@ -272,8 +281,8 @@ static void writefuncstub(struct config *cfg, int is_rel, FILE *out, struct func
}
}
fprintf(out, " %s, __aros_getbase_%s(), %u, %s);\n}\n",
cfg->libbasetypeptrextern, cfg->libbase, funclistit->lvo, cfg->basename
fprintf(out, " %s, __%s_LIBBASE, %u, %s);\n}\n",
cfg->libbasetypeptrextern, cfg->includenameupper, funclistit->lvo, cfg->basename
);
}
else /* libcall==STACK */
@ -336,9 +345,9 @@ static void writefuncstub(struct config *cfg, int is_rel, FILE *out, struct func
fprintf(out,
"%s"
" ({\n"
" AROS_LIBCALL_INIT(__aros_getbase_%s(), %d)\n",
" AROS_LIBCALL_INIT(__%s_LIBBASE, %d)\n",
isvoid ? "" : " return\n",
cfg->libbase, funclistit->lvo
cfg->includenameupper, funclistit->lvo
);
fprintf(out,

View File

@ -152,6 +152,26 @@ struct DiskInfo_DATA
struct NotifyRequest dki_FSNotifyRequest;
};
void GetFSNameFromID(ULONG fsid, STRPTR *fsname_ptr)
{
int i;
for (i = 0; i < sizeof(dt) / sizeof(ULONG); ++i)
{
if (fsid == dt[i])
{
int fsnamlen = strlen(disktypelist[i]);
if (*fsname_ptr)
FreeVec(*fsname_ptr);
if ((*fsname_ptr = AllocVec(fsnamlen + 1, MEMF_ANY)) != NULL)
{
CopyMem(disktypelist[i], *fsname_ptr, fsnamlen);
(*fsname_ptr)[fsnamlen] = '\0';
}
break;
}
}
}
/*** Methods ****************************************************************/
Object *DiskInfo__OM_NEW
(
@ -169,7 +189,6 @@ Object *DiskInfo__OM_NEW
*volusedobj, *volfreeobj,
*grp, *grpformat;
ULONG percent = 0;
ULONG disktype = ID_NO_DISK_PRESENT;
LONG aspect = 0;
TEXT volname[108];
TEXT size[64];
@ -238,27 +257,13 @@ Object *DiskInfo__OM_NEW
volname[strlen(volname)-1] = '\0';
D(bug("[DiskInfo] %s: Volume '%s'\n", __func__, volname));
/* find the volumes doslist information .. */
filesystem = _(MSG_UNKNOWN);
volname[strlen(volname)] = ':';
/* Extract volume info from InfoData */
if (Info(initial, &id) == DOSTRUE)
{
int i;
disktype = id.id_DiskType;
D(bug("[DiskInfo] %s: FSID %08x\n", __func__, disktype));
for (i = 0; i < sizeof(dt) / sizeof(ULONG); ++i)
{
if (disktype == dt[i])
{
filesystem = AllocVec(strlen(disktypelist[i]) + 1, MEMF_ANY|MEMF_CLEAR);
CopyMem(disktypelist[i], filesystem, strlen(disktypelist[i]));
break;
}
}
D(bug("[DiskInfo] %s: Info FSID = %08x\n", __func__, id.id_DiskType));
GetFSNameFromID(id.id_DiskType, &filesystem);
if (!filesystem)
{
filesystem = AllocVec(strlen(unknown) + 1, MEMF_ANY|MEMF_CLEAR);
@ -292,6 +297,12 @@ Object *DiskInfo__OM_NEW
if (dl != NULL)
{
APTR voltask = dl->dol_Task;
if (dl->dol_misc.dol_volume.dol_DiskType &&
(dl->dol_misc.dol_volume.dol_DiskType != id.id_DiskType))
{
D(bug("[DiskInfo] %s: Volume FSID = %08x\n", __func__, dl->dol_misc.dol_volume.dol_DiskType);)
GetFSNameFromID(dl->dol_misc.dol_volume.dol_DiskType, &filesystem);
}
dl = LockDosList(LDF_DEVICES|LDF_READ);
if (dl) {
while((dl = NextDosEntry(dl, LDF_DEVICES)))
@ -318,7 +329,8 @@ Object *DiskInfo__OM_NEW
}
}
}
else
if (!filesystem)
{
filesystem = AllocVec(strlen(unknown) + 1, MEMF_ANY);
CopyMem(unknown, filesystem, strlen(unknown));
@ -330,7 +342,7 @@ Object *DiskInfo__OM_NEW
CLASS, self, NULL,
MUIA_Application_Title, __(MSG_TITLE),
MUIA_Application_Version, (IPTR) "$VER: DiskInfo 0.7 ("ADATE") \xA9 2006-2023 The AROS Dev Team",
MUIA_Application_Version, (IPTR) "$VER: DiskInfo 0.8 ("ADATE") \xA9 2006-2023 The AROS Dev Team",
MUIA_Application_Copyright, __(MSG_COPYRIGHT),
MUIA_Application_Author, __(MSG_AUTHOR),
MUIA_Application_Description, __(MSG_DESCRIPTION),
@ -380,7 +392,7 @@ Object *DiskInfo__OM_NEW
MUIA_Text_Contents, __(MSG_FILESYSTEM),
End,
Child, (IPTR) TextObject,
MUIA_Text_PreParse, (IPTR) "\33I[6:24] \33l",
MUIA_Text_PreParse, (IPTR) "\33l",
MUIA_Text_Contents, (IPTR) filesystem,
End,
#if (1)