~ubuntu-branches/ubuntu/trusty/slof/trusty-proposed

« back to all changes in this revision

Viewing changes to slof/fs/node.fs

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2015-01-23 12:18:53 UTC
  • mfrom: (6.1.1 utopic-proposed)
  • Revision ID: package-import@ubuntu.com-20150123121853-or6a6rkrzor2peku
Tags: 20140630+dfsg-1ubuntu1~14.04
Backport wholesale to trusty to fix network boot issues (LP: #1374568)

Show diffs side-by-side

added added

removed removed

Lines of Context:
322
322
: list-alias ( -- )
323
323
    s" /aliases" find-node dup IF (.list-alias) THEN ;
324
324
 
 
325
\ return next available name for aliasing or
 
326
\ false if more than MAX-ALIAS aliases found
 
327
8 CONSTANT MAX-ALIAS
 
328
1 VALUE alias-ind
 
329
: get-next-alias ( $alias-name -- $next-alias-name|FALSE )
 
330
    2dup find-alias IF
 
331
        drop
 
332
        1 TO alias-ind
 
333
        BEGIN
 
334
            2dup alias-ind $cathex 2dup find-alias
 
335
        WHILE
 
336
            drop 2drop
 
337
            alias-ind 1 + TO alias-ind
 
338
            alias-ind MAX-ALIAS = IF
 
339
                2drop FALSE EXIT
 
340
            THEN
 
341
        REPEAT
 
342
        strdup 2swap 2drop
 
343
    THEN
 
344
;
 
345
 
325
346
: devalias ( "{alias-name}<>{device-specifier}<cr>" -- )
326
347
    parse-word parse-word dup IF set-alias
327
348
    ELSE 2drop dup IF .alias