TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: all
from: Jay Truesdale 72176,3565
date: 1991-04-09 16:20:50
subject: #OSK Data Modules

#: 10186 S12/OS9/68000 (OSK)
    09-Apr-91  16:20:50
Sb: #OSK Data Modules
Fm: Jay Truesdale 72176,3565
To: all

I downloaded the 'conf.c' program from lib 12 here which doesn't work on my
system which is running OSK V1.3.

I've narrowed the problem down with following test program.  On the first
execution of this test program the data module is successfully created as shown
by the output from an 'ident -m':

 Header for:      confblock
 Module size:     $1050       #4176
 Owner:           0.0
 Module CRC:      $330C42     Good CRC
 Header parity:   $3222       Good parity
 Edition:         $1          #1
 Ty/La At/Rev     $400        $8000
 Permission:      $333        ------wr--wr--wr
 Data Mod, Sharable

The 'munload' step at the end fails with an error 221 "(E$MNF) Module not
found."

On the second execution of the test program, the 'modlink' step fails with the
same error.

 /* test.c  */

 #include 
 #include 
 #include 

 #define BLOCKSIZE 4096
 #define DATA_NAME "confblock"

 char *_mkdata_module();
 mod_exec *modlink();
 int munload();

 main ()
 {
   int error_save;
   mod_exec *commod;
   char *module_ptr;

   if ((int)(commod = modlink (DATA_NAME, MT_DATA)) == -1)
   {
      error_save = errno;
      printf("test: Error number %d after attempt to link to confblock\n",
         error_save);

      if (error_save != 221)
         exit (_errmsg (0, "Error %d while linking to module\n", error_save));

      printf("test: Attempting to create a new data module.\n");

      if ((int)(module_ptr = _mkdata_module (DATA_NAME, BLOCKSIZE, 0x8000,
         0x0333)) == -1)
         exit (_errmsg (0, "Error %d while creating module\n", errno));
      else
         printf("test: Data module created.\n");
   }

   if ((munload (DATA_NAME, MT_DATA)) == -1)
      {
         error_save = errno;
         printf("test: Error number %d after attempt to unload confblock\n",
                error_save);
      }
   exit(0); }


I'm baffled.  Anyone got any suggestions?

Thanks in advance!  -J



There is 1 Reply.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.