Date: Mon, 30 Jan 95 20:21:55 PST From: wmb@FirmWorks.COM (Mitch Bradley) To: p1275-wg@prombo.eng.sun.com Reply-To: p1275-wg@prombo.eng.sun.com Subject: Item #225: Alias expansion bug P1275 Openboot Working Group Proposal -- Proposal #:225 Ver 1 Title: Alias expansion bug Author: Mitch Bradley Date: 1/30/95 Ed/Tech: Technical Synopsis: Alias expansion fails with short expansions Doc & Version: 1275-1994 -> Errata document Problem: If "foo" is an alias for "/bar", the alias expansion algorithm in section 4.3.1 expands "foo:0" to "bar:0" instead of "/bar:0" (as reported by Brian Horn). Proposal: * Add the following to the Errata document. (The following page and line numbers refer to P1275-D12.) * Replace Page 46 lines 44-46 with: split-before(string, 'x') -> initial, remainder split-before is similar to left-split, except that if 'x' occurs in 'string', 'remainder' begins with the first occurrence of 'x' (left-split removes the first occurrence of 'x' from 'remainder') split-after(string, 'x') -> initial, remainder split-after is similar to split-before, except that the division of the string occurs after the last occurrence of the character 'x'. If 'x' occurs in 'string', 'initial' ends with 'x', and 'remainder' begins with the first character, if any, following that last occurrence of 'x'. If 'x' does not occur in 'string', 'initial' is set to 'string' and 'remainder' is set to the empty string. * On page 47 lines 1 and 2, replace "left-split and right-split" with "left-split, split-before, and split-after" * Replace page 47 lines 14-26 with: 1) Split-before(PATH_NAME, "/") -> HEAD,TAIL 2) Split-before(HEAD, ":") -> ALIAS_NAME, ALIAS_ARGS 3) If ALIAS_NAME matches a defined alias: i) Replace ALIAS_NAME with its alias value. ii) If ALIAS_ARGS is not empty: a) Split-after(ALIAS_NAME, "/") -> ALIAS_HEAD, ALIAS_TAIL b) Split-before(ALIAS_TAIL, ":") -> ALIAS_TAIL, DEAD_ARGS c) Concatenate(ALIAS_HEAD,ALIAS_TAIL,ALIAS_ARGS) -> ALIAS_NAME iii) Concatentate(ALIAS_NAME, TAIL) -> PATH_NAME [ P1275 Item #225 -- Received: Mon Jan 30 20:23:55 PST 1995 ]