anchor.diff:  : dev  parse-word find-device ;
   
   : (lsprop) ( node --)
  -	dup cr $indent indent @ type ."     node: " node>qname type
  -	false +indent (.properties) cr -indent ;
  +   dup cr $indent indent @ type ."     node: " node>qname type
  +   false +indent (.properties) cr -indent
  +;
   : (show-children) ( node -- )
  -    child BEGIN dup WHILE
  -	dup (lsprop) dup child IF false +indent dup recurse -indent THEN peer
  -    REPEAT drop
  +   child BEGIN
  +      dup
  +   WHILE
  +      dup (lsprop) dup child IF false +indent dup recurse -indent THEN peer
  +   REPEAT
  +   drop
   ;
   : lsprop ( {device-specifier}<eol> -- )
      skipws 0 parse dup IF de-alias ELSE 2drop s" /" THEN
      find-device get-node dup dup
  -   cr ." node: " node>path type (.properties) cr (show-children) 0 indent ! ;
  +   cr ." node: " node>path type (.properties) cr (show-children)
  +   0 indent !
  +;
   
   
   \ node>path does not allot the memory, since it is internally only used
  
positive.code:      node>peer @ swap node>parent @ node>child !
       EXIT
     THEN
         dup node>peer @
         BEGIN 2 pick 2dup <> WHILE
  	     drop
          	nip dup node>peer @
  	   dup 0= IF 2drop drop unloop EXIT THEN
        REPEAT
           drop
      node>peer @ 	swap node>peer !
        drop
  ;
  
  
  : open-dev ( path len -- ihandle|0 )
    de-alias current-node @ >r
    handle-leading-/ current-node @ 0= IF 2drop r> set-node 0 EXIT THEN
    my-self >r 0 to my-self
    0 0 >r >r BEGIN dup WHILE \ handle one component:
    ( arg len ) r> r> get-node open-node to my-self
    find-component ( path len args len node ) dup 0= IF
    3drop 2drop my-self close-dev r> to my-self r> set-node 0 EXIT THEN
    set-node >r >r REPEAT 2drop
    \ open final node
    r> r> get-node open-node to my-self
    my-self r> to my-self r> set-node ;
  : select-dev  open-dev dup to my-self ihandle>phandle set-node ;
  : unselect-dev  my-self close-dev  0 to my-self  device-end ;
  
  
negative.code: ;
  
  : find-alias ( alias-name len -- false | dev-path len )
     s" /aliases" find-node dup IF
        get-property 0= IF 1- dup 0= IF nip THEN ELSE false THEN
     THEN
  ;
  
  : .alias ( alias-name len -- )
      find-alias dup IF type ELSE ." no alias available" THEN ;
  