Abstract:
A method of setting a storage device that a storage management program is built in an application system is used to set a disk label of the storage device and without specially developed application program is set between the application system and the storage device. Some command codes are set as default in the storage device to detect whether the disk label of the storage device is set by the application system includes command codes or not to execute operations are set by the command codes so as to operate the storage device.

Description:
BACKGROUND OF THE INVENTION 
   1. Field of the Invention 
   The present invention relates to a storage device, and more particularly to a method of setting the storage device. 
   2. Description of the Prior Art 
   Recently with the rapidly development of portable storage device, the attached functions of the storage device are also diverse. In order to provide the attached functions are set by the users, it is common that the users install a specially developed application program in an application system such as the personal computer, and operation interfaces such as keyboards and monitors of the application system are used to set the attached functions of the portable storage device. 
   However, the application programs have to be separately developed according to different operation system so that the attached functions are limited, and the application programs have to be stored in the storage device or other storage media are used to store the application programs of the storage device. 
   The inventor of the present invention recognizes the above shortage should be corrected and special effort has been paid to research this field. The present invention is presented with reasonable design and good effect to resolve the above problems. 
   SUMMARY OF THE INVENTION 
   An object of the present invention is to provide a disk label of a storage device is used to provide operations of inputting setting values, switching or selecting the functions of storage device and without specially developed application program is set between an application system and the storage device so that the users directly set the functions by modifying the disk label so as to input the setting values to the storage device. 
   For achieving the objective stated above, the present invention provides a method of setting the storage device. Firstly, the application system sets the disk label to the storage device, and next the storage device determines whether the disk label is changed or not: if “true” and then determines whether the disk label comprises a command code or not: if “true” and then recognizes the command code; if “false” and then returns to a general data access. Finally, the storage device executes a function of the storage device is set by the disk label according to the disk label with the command code. 
   It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the invention as claimed. Other advantages and features of the invention will be apparent from the following description, drawings and claims. 

   
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The above and further advantages of this invention may be better understood by referring to the following description, taken in conjunction with the accompanying drawings, in which: 
       FIG. 1  is a function block diagram of a storage device of the present invention; 
       FIG. 2  is a flow chart of setting the storage device of the present invention; 
       FIG. 2A  is a flow chart of the first preferred embodiment of the present invention; 
       FIG. 2B  is a flow chart of the second preferred embodiment of the present invention; and 
       FIG. 2C  is a flow chart of the third preferred embodiment of the present invention. 
   

   The drawings will be described further in connection with the following detailed description of the present invention. 
   DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
   Reference is made to  FIG. 1  which is a function block diagram of a storage device of the present invention. A controller  113  of the storage device  11  has an analysis module  1131  for reading a medium  115 , recognizing a file system, searching a disk label etc. so as to record contents and storage addresses of the disk label after finding the disk label. That is, when an application system  10  executes a writing operation, the controller  113  checks whether the disk label is changed or not. If the disk label changed, the controller  113  researches the disk label after the application system  10  finishes the writing operation, and records the contents and storage addresses of the disk label after the controller  113  finds the disk label. 
   The controller  113  is used to record a property of the disk label of the storage device  11  is set by the user so that the user inputs setting values to the storage device  11  by setting the disk label. And in order to distinguish the setting values of the storage device  11  and a disk name of the general disk label, a prefix code represents a command code and follow-up words are the parameter of the command code. 
   For example, if the users want to input the password to the storage device  11 , the command code can be “PWD”, and the users input only “PWDn 1 n 2 n 3 n 4 ” that the controller  113  recognizes that the disk label has the command code “PWD” to regard “n 1 n 2 n 3 n 4 ” as the parameter values, that is password. Moreover, in order to accomplish the password identification, it needs to distinguish different command codes such as “PWS” for setting password and “PWD” for checking password. 
   If the users need to adjust a language family for the disk label, the command code is “LANG”, and some parameter values of the language family are set as default. For example, “CNT” means Chinese traditional, “CNS” means Chinese simplified, “JPN” means Japanese and “KRN” means Korean etc. Hence, when the users input “LANGCNT”, that means the storage device  11  is set in Chinese traditional; when the users input “LANGJPN”, that means the storage device  11  is set in Japanese. 
   Besides, the storage device  11  retains a most-significant command code, and the storage device  11  enables or disables the function of the command code of the disk label so that the users set the disk label without limitation of the command code set as default. For example, “LBLCMDOFF” means the command code of the disk label is disabled to set the storage device  11 . And any command code can&#39;t enable the function of the command code of the disk label once again except the command code “LBLCMDON”. 
   In addition, the controller  113  requires to retain a block in the storage medium  115  for recording a function option so as that the controller  113  reads the function option recorded in the storage medium  115  to immediately enter the desired operation mode after the users restart the application system. 
   Reference is made to  FIG. 2  which is a flow chart of setting the storage device of the present invention. Firstly, starting the application system to connect the storage device (at step S 201 ), and next executing a general data access between the application system and the storage device (at step S 203 ), and next opening a storage management program of the application system (at step S 207 ), wherein the storage management program is built in a general application system for setting the disk label of the storage device. And next setting the disk label of the storage device by the storage management program and inputting the command code and the parameter values (at step S 209 ), and next recording the disk label and determining whether the disk label is changed or not by the controller of the storage device (at step S 211 ): if “false” and then returns to step S 203 ; if “true” and then determines whether the disk label comprises a command code or not (at step S 213 ): if “false” and then returns to step S 203 ; if “true” and then recognizes the command code that is which kind of command code (at step S 215 ). 
   Reference is made to  FIG. 2A  which is a flow chart of the first preferred embodiment of the present invention. If the prefix of entered disk label is recognized as the command code of checking password and then checks the password (at step S 217 ). And next determining whether the password inputted passes or not (at step S 219 ): if “false” and then returns to step S 203  (shown in  FIG. 2 ); if “true” and then the storage device opens a accessing right (at step S 221 ) and returns to step S 205  to execute a security data access. 
   Reference is made to  FIG. 2B  which is a flow chart of the second preferred embodiment of the present invention. If the prefix of entered disk label is recognized as the command code of setting password at step S 215  and then sets the password (at step S 223 ). And next determining whether the password set passes or not (at step S 225 ): if “false” and then returns to step S 203  (shown in  FIG. 2 ); if “true” and then records the password inputted in the storage device (at step S 227 ) and returns to step S 205  or step S 203  (shown in  FIG. 2 ). 
   Reference is made to  FIG. 2C  which is a flow chart of the third preferred embodiment of the present invention. If the prefix of entered disk label is recognized as the command code of setting language family at step S 215  and then sets the language family (at step S 229 ). And next stores the language family set in the storage device (at step S 231 ) and returns to step S 203  (shown in  FIG. 2 ). 
   Although the present invention has been described with reference to the preferred embodiment thereof, it will be understood that the invention is not limited to the details thereof. Various substitutions and modifications have been suggested in the foregoing description, and others will occur to those of ordinary skill in the art. Therefore, all such substitutions and modifications are intended to be embraced within the scope of the invention as defined in the appended claims.