anchor.diff:  (defun serial-log-clear()
     (setq *serial-log* nil))
   
  -(defun serial-log-search (key)
  +(defun serial-log-search (key &key timeout)
     (block log-search
       (loop for entry in *serial-log*
             do
             (when (search key entry :test #'char-equal)
               (return-from log-search entry))
  +          (when timeout
  +            (setq timeout (- timeout 1))
  +            (sleep 1)
  +            (if (<= timeout 0)
  +                (return-from log-search nil))
  +            )
             )))
   
   (defun serial-force-output (serial str)
  
positive.code:                                               (mapcar #'(lambda (entry)
                                                            (when (search "* TaskRecord" entry :test #'char-equal)
                                                              (push entry stack))) log)
                                                ))))
      (when result
        (pop stack))))
  
  
negative.code:                            (serial-log-clear)
                             (return f)))
                       )
                     (if (or s timeout)
                         (progn
                           (if s
                               (progn
                                 (format t "wait ~a result ~a success~%" comm
                                         result)
                                 (when collect
                                   (setq s (funcall collect *serial-log*)))
                                 (serial-log-clear)
                                 (return s))
                               (progn
                                 (format t "timeout,run retry~%")
                                 (wait-shell serial "" 10)
                                 (serial-log-clear)
                                 (serial-force-output serial comm)
                                 (sleep 2))
                           ))))
                 ))))
  
  (defun power-callback (serial str result fail-result)
    (format t "Machine shut down~%"))
  