[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MCL 2.0.1 on PowerMac with Sys7.5



Can anyone change the volume name of a disk in MCL under system 7.5?

I have a function works fine on Quadra800 with system 7.1.1.
(defun change-volume-name (from-path to-path)
  (ccl::%stack-iopb (pb np)
    (ccl::%put-volume-name np from-path)
    (%put-word pb (if (ccl::%izerop (%get-byte np)) 0 -1) $ioVolIndex)
    (%put-word pb 0 $ioVRefNum)
    (ccl::file-errchk (#_HGetVInfo pb) from-path)
    (ccl::%put-volume-name np to-path)
    (ccl::file-errchk (#_SetVInfo pb) to-path)))

On PowerMac 8100 with system 7.5, the symptom is:
?  ;;; try to rename an optical disk from "old-vol" to "new-vol"
? (probe-file "old-vol:")
#P"old-vol:"
? (probe-file "new-vol:")
NIL
? (change-volume-name "old-vol:" "new-vol:")
NIL
? (probe-file "old-vol:")
NIL
? (probe-file "new-vol:")
#P"old-vol:"
? 

Seems like it create an alias within MCL rather than actually changing the
volume name...
Any clue!?

- Chuey -