Menu

#90 acquire_resource incorrectly formats error message

MCRB
closed
None
2017-02-11
2015-10-03
No

acquire_resource incorrectly formats error message:

r 13:46 0.371 11

aqr disk_vol dskb
acquire_resource: for \000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\c000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000 \000\
\c000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0
\c00\000\000\000\000\000\000\000\000\000\000\000

bound_rcp_support_:register_resource.pl1

crump_in_struc:
entry (code, reason);

      do i = 1 to resource_descriptions.n_items while (resource_descriptions.item (i).status_code = 0);
      end;

      if i <= resource_descriptions.n_items then
         call com_err_ (code, myname, reason);
      else call com_err_ (resource_descriptions.item (i).status_code, myname, "for ^a ^a",
                resource_descriptions.item (i).type, resource_descriptions.item (i).name);

The routine searches the acquired resource list looking for a non-zero status code; if it finds one, it displays information about that resource. If one is not found, it displays information about why the resource was not acquired.

Unfortunately, the logic in the 'if' is reversed; it displays information about the n+1th entry, which is both unitialized and unhelpful, and fails to display "reason", which is what is needed.

Demonstration of fixed code (s/<=/>/):

r 13:58 4.600 143

cac$aqr disk_vol dskb
acquire_resource: Entry not found. Cannot acquire resources.

Discussion

  • Charles Anthony

    Charles Anthony - 2015-11-12

    The same bug is in register_resource.pl1

     
  • Eric Swenson

    Eric Swenson - 2016-12-26

    As as I know, this was fixed with MCR10010 some time ago.

     
  • Eric Swenson

    Eric Swenson - 2016-12-26
    • status: open --> closed
     
  • Eric Swenson

    Eric Swenson - 2017-02-11

    Closing as ticket moved here: http://multics-trac.swenson.org/ticket/23

     

Log in to post a comment.