CN105573809A - Method and device for establishing equipment nodes - Google Patents
Method and device for establishing equipment nodes Download PDFInfo
- Publication number
- CN105573809A CN105573809A CN201610090164.7A CN201610090164A CN105573809A CN 105573809 A CN105573809 A CN 105573809A CN 201610090164 A CN201610090164 A CN 201610090164A CN 105573809 A CN105573809 A CN 105573809A
- Authority
- CN
- China
- Prior art keywords
- node
- device node
- drives
- loaded
- listed files
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4411—Configuring for operating with peripheral devices; Loading of device drivers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method and device for establishing equipment nodes. The method comprises the steps that an equipment driving file list is stored in a text file form in an equipment file storage device; whether an equipment node corresponding to an equipment driver to be loaded exists in the equipment file storage device or not is judged; if yes, the equipment node stored in the equipment file storage device and corresponding to the equipment driver to be loaded is copied into a memory; if not, the equipment driver is loaded according to content in the list, the number of the equipment node is obtained, a new equipment node is established according to the number of the equipment node and the content in the list, and the newly established equipment node is stored in the equipment file storage device. Through the method and device, the equipment nodes can be established quickly and dynamically.
Description
The divisional application of the application's to be the denomination of invention proposed on November 15th, 2012 be Chinese invention patent application 201210459647.1 of " the establishment method of device node and device ".
Technical field
The present invention relates to embedded system applied technical field, specifically, relate to a kind of method and the device that create device node.
Background technology
Embedded system, as the device drives in linux system be all with the form of device node (device file) exist so that the kernel of the user of application layer and bottom carries out alternately.Linux has two kinds for the load mode of device drives: a kind of mode is by direct for device drives static compilation in kernel, will drive from moving loading equipment when system starts and create device node; Another kind of mode is that device drives exists independent of kernel in the mode of module, can after kernel starts dynamically load driver and create device node, and dynamically unloading equipment drives and sweep equipment node.
Wherein, the advantage of first kind of way uses simply, and load driver is fast, and device node, once create, does not need when device drives does not update again to create, and then it is fast that system is started.Shortcoming is dumb, and increase and decrease device drives needs to recompilate kernel, and kernel is metastable for system, should not frequently change; And this mode cannot meet the demands for the equipment of plug and play, because the node of this equipment needs dynamic creation.Further, this mode is along with increasing of driving, and the volume of kernel also can constantly become large, and this is also that embedded system does not wish to see.Therefore, generally adopt first kind of way to load basic for system, general driving in existing Embedded System Design, and personnalité the drivings employing second way is loaded.
But, although the second way also exists and uses flexibly, dynamically can carry out the advantage that loads, reduce the volume of kernel, save the internal memory of system.But its shortcoming is also very obvious: use trouble, all needs when every subsystem starts to drive from external load, cause system to start slower.And each start all needs to re-create device node, create device node and occupy more starting up's time, cause system to start slower.This point shows particularly outstanding in the electronic product of the use such as Set Top Box, mobile phone Embedded Linux System, because these electronic product functions get more and more, the personalization equipment needed drives more and more, thus driving at loading equipemtn and create device node takes time more and more, and system start-up time (on time) is a very important technical indicator of this series products, therefore, the lifting of as easy as rolling off a log limit product performance.
Summary of the invention
The present invention is directed to device node in prior art create the problems referred to above of existence and provide a kind of method and apparatus creating device node, achieve the establishment of quick, dynamic device node.
For achieving the above object, method provided by the invention adopts following technical proposals to be achieved:
Create a method for device node, described method comprises the steps:
A, in device file storer, include the device drives listed files of device drives title, device node title and correlation parameter with the storage of text form;
Whether there be the device node corresponding with device drives to be loaded in b, judgment device file memory, if having, perform following step c, if nothing, perform following steps d and e;
C, by being stored in device file storer, the device node corresponding with device drives to be loaded be copied in internal memory;
D, fetch equipment drive listed files, drive according to list content loading equipemtn, obtain device node number;
E, create the device node corresponding with the device drives of loading according to device drives listed files content and device node number, and the device node of establishment is stored in device file storer.
Whether method as above, in described step b, have the device node corresponding with device drives to be loaded according in following step judgment device file memory:
B01, search in device file storer device node storage directory in whether there is device node;
B02, when there is device node, edit session T1 that store in fetch equipment file memory, this device node corresponding device drives listed files when creating;
B03, obtain the edit session T2 of device drives listed files corresponding to device drives to be loaded;
B04, when T1 and T2 is identical, have the device node corresponding with device drives to be loaded in determining apparatus file memory, when both are different, the device node stored in determining apparatus file memory is not corresponding with the device drives of loading.
Method as above, abnormal for avoiding resource contention to cause system to start, there is device node in device node storage directory in device file storer and device node and device drives to be loaded not to the time in of corresponding first delete all devices node, and then perform described steps d and e.
Method as above, for ease of recycling, also comprises the steps: after described step e
F, in device file storer, store the edit session of corresponding device drives listed files when this device node creates.
Method as above, for avoiding repeating to create device node, improve establishment speed further, in described step e, creates device node according to following sub-step:
E01, from device drives listed files, obtain the device node title of device node to be created;
The device node number that after e02, acquisition load device drives corresponding to this device node, system is distributed;
E03, judging the device node that whether there is same names in internal memory, when not existing, performing step e05, when existing, performing step e04;
E04, judge whether the device node of device node number and the device node to be created of the device node of same names in internal memory is number identical, if different, perform step e05, if identical, abandons the establishment of device node;
E05, create device node according to device node title and device node number.
Method as above, described device node number includes major device number and from device number, in described step e04, the major device number and from the major device number of device number and device node to be created and from device number homogeneous phase simultaneously of the device node of same names in internal memory, judge that the device node of two device nodes is number identical, abandon the establishment of device node.
Method as above, described device file storer espespecially flash storer.
For realizing aforementioned invention object, device provided by the invention adopts following technical proposals to realize:
Create a device for device node, this device includes device file storer and device node creation module, and device node storer comprises:
Device drives listed files storage unit, includes the device drives listed files of device drives title, device node title and correlation parameter with the storage of text form;
Device node storage unit, be used for storage system kernel create device node;
Device node creation module comprises:
Device drives listed files reading unit, being used for from device file storer fetch equipment drives listed files;
Device node identifying unit, whether corresponding with device drives to be loaded for the device node stored in determining apparatus file memory;
Device node loading unit, is connected with device node identifying unit, according to result of determination from device file storer loading equipemtn node in Installed System Memory;
Device drives loading unit, drives for loading equipemtn; And
Device node creating unit, is connected with device node identifying unit and device drives listed files reading unit, for the device node that the device drives created with load is corresponding.
Method as above, also includes list edit time memory cell in described device file storer, for storing the edit session T1 of device drives listed files corresponding when the device node stored in external storage creates;
Described device node creation module also includes:
List edit time acquisition unit, the T1 stored in the edit session T2 of the device drives listed files that the device drives for obtaining loading is corresponding and list edit time memory cell;
Whether edit session comparing unit, is connected with list edit time acquisition unit and device node identifying unit, identical for comparing T1 with T2, and comparative result is exported to described device node identifying unit.
Method as above, is characterized in that, described device node creation module also comprises:
Device node output unit, for writing to the device node storage unit of described device file storer by the device node of establishment; And
Device node repeats identifying unit, for whether there is the node repeated with device node to be created in decision-making system internal memory.
Compared with prior art, advantage of the present invention and good effect are: device drives listed files is stored on device file storer with text form by the present invention, realized the dynamic creation of device node by read list, make the management of device drives easier, efficient; Adopt when creating device node create once to be stored in afterwards in device file storer, the copy method be directly copied to from device file storer when later using in internal memory, effectively shorten the time creating device node and consume, improve system boot toggle speed.
After reading the specific embodiment of the present invention by reference to the accompanying drawings, the other features and advantages of the invention will become clearly.
Accompanying drawing explanation
Fig. 1 is the structural representation that the present invention creates a device embodiment of device node;
Fig. 2 is the main flow chart that the present invention creates a method embodiment of device node;
Fig. 3 is the sub-process figure judging whether to need reconstructing apparatus node in Fig. 2 embodiment;
Fig. 4 is the sub-process figure creating device node in Fig. 2 embodiment.
Embodiment
Below in conjunction with the drawings and specific embodiments, technical scheme of the present invention is described in further detail.
Please refer to Fig. 1, this Figure 1 shows that the present invention creates the structural representation of a device embodiment of device node.
As shown in Figure 1, the device of this embodiment includes device node creation module 11 and device file storer 12, and wherein, device file storer 12 is the memory devices independent of internal memory, as flash storer.
Device file storer 12 includes device drives listed files storage unit 121, list edit time memory cell 122 and device node storage unit 123.Wherein, device drives listed files storage unit 121 drives listed files with text form memory device, includes the information such as device drives title, device node title and the correlation parameter of establishment needed for node in this list.The edit session T1 of the device drives listed files that the device node that list edit time memory cell 122 is used for storing in memory device file memory 12 is corresponding when creating, utilize this edit session can judgment device node the need of re-creating, specifically please refer to the description of method below.And device node storage unit 123 be used for storage devices node creation module 11 create device node, this device node is stored in device file storer 12 with backup form, copy for device node creation module 11, can significantly improve system toggle speed, concrete principle and implementation procedure please refer to the description of method flow below.
Function and the interconnected relationship of the cell mesh that device node creation module 11 comprises and each unit are as described below:
Device drives loading unit 111, is connected with device drives listed files reading unit 112, is used for according to the device drives title dynamic load device drives in device drives listed files in device node creation module 11.
Device drives listed files reading unit 112, be used for device file storer 12 device drives listed files storage unit 121 in fetch equipment drive listed files in device node creation module 11, to carry out the dynamic load of device drives and the dynamic creation of device node.
List edit time acquisition unit 113, be used on the one hand obtaining the edit session T1 of device drives listed files corresponding when the device node stored in device file storer 12 creates from the list edit time memory cell 122 of external storage 12, be used for obtaining the edit session T2 of device drives listed files corresponding to the device drives that will load on the other hand.
Whether edit session comparing unit 114, is connected with list edit time acquisition unit 113, identical for comparing T1 with T2, and exports comparative result.
The object arranging above-mentioned list edit time acquisition unit 113 and edit session comparing unit 114 utilizes the list edit time to judge whether to need to re-create device node, and concrete principle and using method please refer to the description of method flow below.
Device node identifying unit 115, be connected with device drives listed files reading unit 112 with edit session comparing unit 114, whether corresponding with device drives to be loaded according to the device node stored in the information judgment device file memory 12 in the Output rusults of edit session comparing unit 114 and device drives listed files.Judge corresponding time, by control connected device node loading unit 119 from the device node storage unit 123 of device file storer 12 loading equipemtn node in device node creation module 11; When the device node stored in determining apparatus file memory 12 is not corresponding with device drives to be loaded, the connected device node creating unit 116 of control is re-created the device node corresponding with the device drives loaded.
For device node creating unit 116, it is when creating device node, the result of determination that the listed files read according to device drives listed files reading unit 112 and device node repeat identifying unit 117 is carried out work, to create out correct device node.The flow process that concrete constructive process please refer to following method describes.
Device node creating unit 116 is also connected with device node output unit 118, after device node creating unit 116 newly creates device node, device node will be write in the device node storage unit 123 of device file storer 12 by device node output unit 118, realize the backup of device node, use for subsequent copies.
Said apparatus more specifically principle of work and process please refer to the description of method below.
Please refer to Fig. 2 creates device node embodiment of the method to the present invention illustrated in fig. 4, wherein, Fig. 2 is the main flow chart of this embodiment, and Fig. 3 is the sub-process figure judging whether to need reconstructing apparatus node, and Fig. 4 is the sub-process figure creating device node.
First, the technical background of this embodiment of brief description: for an embedded system, as linux system, by basic in system, general device drives static compilation in system kernel, when system starts can automatically in kernel loading equipemtn drive and create corresponding device node.And for most of personalized device drives, it being stored independent of kernel with modular form, is dynamically load in use, accordingly, the device node that dynamic creation device drives is corresponding.The device drives that will tell about of this embodiment loads the dynamic load referred to the device drives existed with modular form independent of kernel, accordingly, refers to the dynamic creation carried out this part device drives during the establishment of device node.
And, the basic thought of this embodiment is briefly described below: will to load with device drives and device node creates relevant device drives title, device node title and correlation parameter and is organized into device drives listed files with text form, this list is stored in advance in one independent of in the device file storer of internal memory, is preferably stored in the flash storer of embedded system.Then, whether will take certain technological means, be created when last time starts as carried out judgment device node according to the mark on flash, if created, system if will automatically copy the device node that flash has stored.If do not created, by automatic read list file, create out all device nodes successively, device node is saved on flash as backup simultaneously.Due to copy the node time spent compare create all node required times negligible, and because create node more consuming time, thus this kind of method can significantly improve system start-up time.After adopting the method, only has the first time that system starts, device node creates once automatically, do not occur more under news at device drives listed files, every subsystem starts later just only needs copying equipment node, thus both achieved the dynamic process that device node creates, the toggle speed of system can have been ensured again.
And device drives and device node information are stored with the form of text, not only structure is simple and clear, it is convenient to read, and be convenient to manually to carry out to add, the editor such as deletion, be convenient to management and.
This embodiment creates the main flow of device node as shown in Figure 2, this embodiment is using flash as device file storer, and when performing this main flow, in flash, store with text form the device drives listed files including device drives title, device node title and correlation parameter in advance.Detailed process is as follows:
Step 201: flow process starts.
Step 202: judgment device node is the need of reconstruction.If desired, step 203 is performed to 209; If do not need, perform step 210 to 212.
Determination methods and process can with reference to figure 3 and below to the description of Fig. 3.
Step 203: when needs reconstructing apparatus node, first deletes all devices node of back-up storage on flash.
If device drives listed files upgrades, then likely need reconstructing apparatus node.And when creating device node, all device nodes are needed all to re-create, when creating device node this is because each, the device node that distributes of system is number very likely different, if only part re-creates, part remains unchanged, may resource contention be there is and cause system normally to start.Therefore, when needs reconstructing apparatus node, first all devices node that flash has stored is all deleted.Certainly, if first time creates, can not device node be there is, then need not perform this deletion action.
Step 204: fetch equipment listed files, circulate the device drives title, device node title and the correlation parameter that obtain each device drives.
This process reads in internal memory, the device file list in flash storer to process fast.
Step 205: drive, to obtain the device node number of system assignment according to the device drives title loading equipemtn in list.
Step 206: create the device node corresponding with the device drives loaded.
The concrete constructive process of device node please refer to Fig. 4 and below to the description of Fig. 4.
Step 207: judge whether whole node has all created.If so, step 208 is performed; If not, go to step 204, continue to obtain next device drives information, the establishment of finishing equipment node.
Step 208: after all devices node has all created, copy created device node on flash back-up storage, directly calls when starting for lower subsystem.
Step 209: list edit time corresponding when storage devices node creates on flash.Then, 213 are gone to step.
This embodiment conveniently judgment device node, the need of reconstruction, have employed and whether edited the technological means determined according to list.In device file list, be provided with list edit time tag, the time of this time tag is kept synchronous with list by the time of editing.After having re-created device node, all read this edit session at every turn, and this time is stored in flash.
Step 210: when judging not need to re-create device node, fetch equipment listed files, circulate the device drives title, device node title and the correlation parameter that obtain each device drives.
This process reads in internal memory, the device file list in flash storer to process fast.
Step 211: drive according to the device drives title loading equipemtn in list.
Create for device node, if do not need reconstructing apparatus node, the optional step of this step, because not needing to be driven by loading equipemtn obtains device node number.But as an entire flow, the copy of device node performs after having loaded device drives, so loading equipemtn drives a step as creating device node to describe by this embodiment.
Step 212: device node corresponding with the device drives loaded in flash is copied in kernel.Then, 213 are gone to step.
When every subsystem starts, device drives all needs to reload.And longer device node consuming time is created, because in flash, backup has device node, when not changing according to certain means determining apparatus node, not needing to re-create, then direct the device node stored in flash to be copied in kernel.Because the copy procedure of device node is faster than constructive process speed, therefore, the time that system starts greatly is saved.
Step 213: main flow terminates.
For judgment device node the need of rebuilding, also namely judging whether store the device node corresponding with device drives to be loaded in flash, it is the key that guarantee system normally starts, improves system toggle speed, this embodiment adopts the flow process of Fig. 3 to judge, specific as follows:
Step 301: create and be flexible coupling, makes the device node storage directory on the device node catalogue sensing flash of internal memory.Thus, internal memory can access the device node storage directory of flash, and processes content wherein.
Step 302: whether have device node in judgment device node storage directory.If have, perform step 303; If no, go to step 307.
Step 303: when having device node in catalogue, reads the edit session T1 of device drives listed files corresponding when this device node creates in flash.
As previously mentioned, in flash during alternate device node, can store the edit session of device drives listed files corresponding when this device node creates, this time is designated as T1, and this step is by this time of reading.
Step 304: the edit session T2 of the device drives listed files that the device drives that acquisition loads is corresponding.
If device drives upgrades, can edit, and then programming is in flash to corresponding device drives listed files, this process is generally occur when product up-gradation.And when device drives listed files is edited, by record list by the time of editing, this time is designated as T2.
Step 305: judge that whether T1 and T2 is identical.If so, step 306 is performed; If not, 307 are gone to step.
Step 306: when T1 with T2 is identical, judges not need reconstructing apparatus node, will perform step 210 in Fig. 2 main flow.
If T1 and T2 is identical, illustrate that existing device node is up-to-date relative to existing device drives listed files, namely after establishment device node, device drives listed files does not update yet.Thus, device node now and device drives are consistent, for avoiding newly creating the node cost longer time, do not need to re-create device node.
Step 307: there is not device node in device node storage directory, if or T1 and T2 different, judge need reconstructing apparatus node, will step 203 be performed in Fig. 2 main flow.
Wherein, if T1 and T2 is not identical, devices illustrated drives listed files edited, and also not according to the device drives listed files apparatus for establishing node after editor, namely existing device node is not up-to-date relative to existing device drives listed files yet, for ensureing the consistent of device drives and device node, need to re-create device node.Only need to be created in system starting process by the first time after edited at device drives listed files owing to re-creating device node, in the immovable situation of list, the start-up course in later stage does not need to create again, thus greatly can reduce the overall startup time of system yet.
Above-mentioned Fig. 3 only illustrates and adopts edit session as a kind of implementation judging whether to need reconstructing apparatus node, but is not limited to this, can also adopt other modes according to the actual requirements to judge.
The step 206 creating device node in Fig. 2 main flow specifically can adopt the establishment sub-process shown in Fig. 4 to realize, and detailed process is as follows:
Step 401: the device node title obtaining device node to be created from device drives listed files.
Create device node and will be referred to as suction parameter with device node name, therefore, first obtain device node title.
Step 402: the device node number of system assignment after the device drives that this device node of acquisition loading is corresponding.
System, can automatically for this device drives be allocated a device node number after loading equipemtn drives, and this node number will together with nodename, as the mark of a device node.
Step 403: judge the device node that whether there is same title in system kernel.If so, step 404 is performed; If not, 407 are gone to step.
For avoid devices in system node repeat create, this step is set and judges.In this example, will judge one by one according to device node title and device node number.
Step 404: if there is the device node of same title in kernel, then judge that whether the major device number of the device node of same title is identical again.If identical, perform 405; If different, go to step 407.
Device node number generally comprises major device number and from device number, this embodiment will judge one by one.
Step 405: when the major device number of the device node of same title is identical, judges the whether identical from device number of these two device nodes.If identical, perform step 406; If not identical, then perform step 407.
Step 406: the while of in the major device number of the device node of same title with from device number homogeneous phase, illustrate that the device node that will create is identical with already present same title device node, then abandon the establishment of device node, use already present device node.
The execution speed of above-mentioned deterministic process is faster than the speed of an establishment device node, so, if judge identical, no longer re-create a node, node can be improved again and create speed and efficiency.
Step 407: if there is not the device node of same title or the major device number or different from device number with the device node of title in kernel, then judge there is not identical device node in kernel, then create device node according to the device node number of device node title, correlation parameter and the system assignment in device drives listed files.
It should be noted that, in this step 407, if there is same title but the device node of different node number, for avoiding confusion, first deleting already present same title device node, then create new device node according to device node title and device node number.
Above embodiment only in order to technical scheme of the present invention to be described, but not is limited; Although with reference to previous embodiment to invention has been detailed description, for the person of ordinary skill of the art, still can modify to the technical scheme described in previous embodiment, or equivalent replacement is carried out to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of the present invention's technical scheme required for protection.
Claims (10)
1. create a method for device node, it is characterized in that, described method comprises the steps:
The device node corresponding with device drives to be loaded whether is had in judgment device file memory;
If so, from device file storer, then obtain the device node prestored, and the device node corresponding with device drives to be loaded in the described device node got is copied in internal memory;
If not, then drive according to the content loading equipemtn of the device drives listed files prestored, obtain device node number, and create the device node corresponding with device drives to be loaded according to device drives listed files content and device node number.
2. method according to claim 1, is characterized in that, whether has the device node corresponding with device drives to be loaded, specifically comprise in described judgment device file memory:
Obtain the edit session T1 of device drives listed files corresponding when the device node stored in device file storer creates, and obtain the edit session T2 of device drives listed files corresponding to device drives to be loaded;
When T1 with T2 is identical, determine to preserve the device node corresponding with device drives to be loaded in device file storer, when T1 with T2 is not identical, determine device node not corresponding with device drives to be loaded in device file storer.
3. method according to claim 1, is characterized in that, whether has the device node corresponding with device drives to be loaded, specifically comprise in described judgment device file memory:
Obtain and whether identify in the startup started for identifying the device node preserved in described device file storer;
If so, judge to store the device node corresponding with device drives to be loaded in described device file storer according to described startup mark, if not, then determine device node not corresponding with device drives to be loaded in described device file storer.
4. method according to claim 2, it is characterized in that, also comprise before the step that the content loading equipemtn of the device drives listed files prestored in described basis drives: determining device node not corresponding with device drives to be loaded in device file storer, then delete all devices node preserved in described device file storer.
5. method according to claim 4, is characterized in that, described create the device node corresponding with device drives to be loaded according to device drives listed files content and device node number after also comprise:
The edit session of device drives listed files corresponding when the device node corresponding with device drives to be loaded creates is stored in device file storer.
6. method according to claim 5, is characterized in that, the device drives listed files content that described basis prestores and device node number create the device node corresponding with device drives to be loaded and specifically comprise:
The device node title of device node to be created is obtained from described device drives listed files;
Judge in internal memory, whether there be the device node identical with described device node title, if not, then create device node according to described device drives listed files and device node number, if, then judge whether the device node of the device node number of the device node of same names in internal memory and device node to be created is number identical, if so, then abandons the establishment of device node, if not, then device node is created according to described device drives listed files and device node number.
7. method according to claim 6, it is characterized in that, described device node number includes major device number and from device number, judge that the device node of the device node number of the device node of same names in internal memory and device node to be created is number identical specifically to comprise: if the major device number and from the major device number of device number and device node to be created and from device number homogeneous phase simultaneously of the device node of same names in internal memory, judge that the device node of two device nodes is number identical.
8. create a device for device node, it is characterized in that, this device includes device file storer and device node creation module,
Device node creation module comprises:
Whether device node identifying unit, for having the device node corresponding with device drives to be loaded in judgment device file memory;
Device node loading unit, be connected with device node identifying unit, according to when result of determination is for being, from device file storer, obtain the device node prestored, and the device node corresponding with device drives to be loaded in the described device node got is copied in internal memory;
Device drives loading unit, drives for the content loading equipemtn according to the device drives listed files prestored; And
Device node creating unit, is connected with device drives loading unit, for obtaining device node number, and creates the device node corresponding with device drives to be loaded according to device drives listed files content and device node number.
9. method according to claim 8, is characterized in that, includes list edit time memory cell in described device file storer, the edit session T1 of device drives listed files corresponding when creating for storage devices node;
Described device node creation module also includes:
List edit time acquisition unit, the T1 stored in the edit session T2 of the device drives listed files that the device drives for obtaining loading is corresponding and list edit time memory cell;
Whether edit session comparing unit, is connected with list edit time acquisition unit and device node identifying unit, identical for comparing T1 with T2, and comparative result is exported to described device node identifying unit.
10. method according to claim 8 or claim 9, it is characterized in that, described device node creation module also comprises:
Device node output unit, for writing to the device node storage unit of described device file storer by the device node of establishment; And
Device node repeats identifying unit, for whether there is the node repeated with device node to be created in decision-making system internal memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610090164.7A CN105573809B (en) | 2012-11-15 | 2012-11-15 | Create the method and device of device node |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210459647.1A CN102999353B (en) | 2012-11-15 | 2012-11-15 | Create method and the device of device node |
CN201610090164.7A CN105573809B (en) | 2012-11-15 | 2012-11-15 | Create the method and device of device node |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210459647.1A Division CN102999353B (en) | 2012-11-15 | 2012-11-15 | Create method and the device of device node |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105573809A true CN105573809A (en) | 2016-05-11 |
CN105573809B CN105573809B (en) | 2019-05-24 |
Family
ID=47927958
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210459647.1A Active CN102999353B (en) | 2012-11-15 | 2012-11-15 | Create method and the device of device node |
CN201610090164.7A Active CN105573809B (en) | 2012-11-15 | 2012-11-15 | Create the method and device of device node |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210459647.1A Active CN102999353B (en) | 2012-11-15 | 2012-11-15 | Create method and the device of device node |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN102999353B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112148229A (en) * | 2020-10-12 | 2020-12-29 | 北京计算机技术及应用研究所 | Method for accelerating nonvolatile memory read-write efficiency under Feiteng server platform |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105657464B (en) * | 2016-01-28 | 2018-12-07 | 四川长虹电器股份有限公司 | A kind of screen method of USB duplicate node |
CN107015807B (en) * | 2017-04-06 | 2020-07-10 | 青岛海信宽带多媒体技术有限公司 | Device driver management method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1512335A (en) * | 2002-12-31 | 2004-07-14 | 北京科泰世纪科技有限公司 | Drive method based on structure operation system dynamic equipment |
US20070143286A1 (en) * | 2005-12-08 | 2007-06-21 | Kim Hong Y | File management method in file system and metadata server therefor |
CN101520756A (en) * | 2009-04-07 | 2009-09-02 | 深圳华为通信技术有限公司 | Equipment driving method, equipment driving device and communication system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0584909A1 (en) * | 1992-08-26 | 1994-03-02 | Sun Microsystems, Inc. | Self configuring device system |
CN102682088B (en) * | 2012-04-23 | 2016-11-09 | Tcl集团股份有限公司 | The hanging method of a kind of storage device, system and TV |
-
2012
- 2012-11-15 CN CN201210459647.1A patent/CN102999353B/en active Active
- 2012-11-15 CN CN201610090164.7A patent/CN105573809B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1512335A (en) * | 2002-12-31 | 2004-07-14 | 北京科泰世纪科技有限公司 | Drive method based on structure operation system dynamic equipment |
US20070143286A1 (en) * | 2005-12-08 | 2007-06-21 | Kim Hong Y | File management method in file system and metadata server therefor |
CN101520756A (en) * | 2009-04-07 | 2009-09-02 | 深圳华为通信技术有限公司 | Equipment driving method, equipment driving device and communication system |
Non-Patent Citations (4)
Title |
---|
RICHARD BLUM: "《汇编语言程序设计》", 31 January 2006, 机械工业出版社 * |
ZZBOX: "linux自动创建设备节点", 《HTTP://BLOG.CHINAUNIX.NET/UID-26119896-ID-3246974.HTML》 * |
刘军芳等: "基于S3C2410的PWM驱动程序的研究与实现", 《微计算机信息》 * |
李善平等: "《linux与嵌入式***》", 31 January 2003, 清华大学出版社 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112148229A (en) * | 2020-10-12 | 2020-12-29 | 北京计算机技术及应用研究所 | Method for accelerating nonvolatile memory read-write efficiency under Feiteng server platform |
CN112148229B (en) * | 2020-10-12 | 2024-01-30 | 北京计算机技术及应用研究所 | Method for accelerating read-write efficiency of nonvolatile memory under Feiteng server platform |
Also Published As
Publication number | Publication date |
---|---|
CN102999353B (en) | 2016-02-03 |
CN105573809B (en) | 2019-05-24 |
CN102999353A (en) | 2013-03-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4946088B2 (en) | How to build a business operation environment | |
AU685476B2 (en) | File name detecting methd for use with operating system | |
US9037830B2 (en) | Organization of a small object area and a large object area in a Java heap | |
CN109388478A (en) | Method and apparatus for migrating virtual machine in OpenStack environment | |
JP2003177974A (en) | File system, file system control method and program for controlling file system | |
CN110908671A (en) | Method and device for constructing docker mirror image and computer readable storage medium | |
CN103902399B (en) | Software system repair processing method and software system repair processing device | |
CN105183517A (en) | Method and device for mounting external storage equipment in recovery mode and electronic device | |
CN105138430A (en) | Embedded operating system backup and restoration method and device | |
CN102999353B (en) | Create method and the device of device node | |
CN101833464A (en) | Method and device for sectionally loading application programs by mobile terminal | |
CN103389905A (en) | Plug-in loading method and plug-in loading system | |
CN1251541C (en) | Method for shortening booting time of digital equipment having flash memory | |
CN104021022A (en) | Partition adjusting method and electronic equipment | |
CN104375896A (en) | Information processing method and electronic equipment | |
JP2013205946A (en) | Migration control program, migration control method, and control device | |
JPH10177425A (en) | Computer system | |
CN106484312A (en) | A kind of magnetic disk of virtual machine data migration method and device | |
CN113190244A (en) | Method and device for upgrading wireless module, computer equipment and storage medium | |
JP3941597B2 (en) | Logical partitioned computer system | |
CN111158709A (en) | Cluster deployment method, device and equipment and computer readable storage medium | |
CN100407158C (en) | Method for accessing data file of telecommunication apparatus | |
CN101685422B (en) | Memory space management method and computer system using same | |
KR100631780B1 (en) | Communication method between overlay units and apparatus using same | |
CN112463644B (en) | Regression testing method, device and equipment of data recovery software and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |