CN105573809B - Create the method and device of device node - Google Patents
Create the method and device of device node Download PDFInfo
- Publication number
- CN105573809B CN105573809B CN201610090164.7A CN201610090164A CN105573809B CN 105573809 B CN105573809 B CN 105573809B CN 201610090164 A CN201610090164 A CN 201610090164A CN 105573809 B CN105573809 B CN 105573809B
- Authority
- CN
- China
- Prior art keywords
- node
- device node
- drives
- memory
- 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.)
- Active
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 kind of method and devices for creating device node, and the method includes the following steps: storing device drives listed files in the form of text file in device file memory;Judge whether there is device node corresponding with device drives to be loaded in device file memory;If so, will be stored in device file memory, device node corresponding with device drives to be loaded is copied in memory;If nothing, driven according to list content loading equipemtn, obtain device node number, device node is newly then created according to device node number and list content, and by the storage of the device node of creation into device file memory.Using the present invention, quick, dynamic device node creation may be implemented.
Description
The application is in entitled " method and device of creation device node " proposed on November 15th, 2012
The divisional application of state's application for a patent for invention 201210459647.1.
Technical field
The present invention relates to embedded system applied technical fields, specifically, being to be related to a kind of side for creating device node
Method and device.
Background technique
Embedded system, the device drives such as in linux system are existed in the form of device node (device file),
In order to which the user of application layer and the kernel of bottom interact.Linux for device drives loading method there are two types of: it is a kind of
Mode be by the direct static compilation of device drives into kernel, when system starting will automatic loading equipemtn driving and
Create device node;Another way is that device drives exist in a manner of module independently of kernel, can be after kernel starting
Dynamically load driver and creation device node, and dynamically unloading equipment driving and sweep equipment node.
It wherein, is using simple the advantages of first way, load driver is fast, and device node once creates completion, is setting
Standby driving does not need to create again in the case where not updating, so that system starting is fast.The disadvantage is that not flexible, increase and decrease is set
Standby driving needs to recompilate kernel, and kernel be for system it is metastable, should not frequently change;And this side
Formula is unable to satisfy requirement for the equipment of plug and play, because the node of this equipment needs dynamic creation.In addition,
This mode increases with driving, and the volume of kernel also can constantly become larger, this is also that embedded system is not intended to see.Cause
This, generally by system, basic, general driving is loaded using first way in existing Embedded System Design, and for
Personnalité driving is loaded using the second way.
But although the second way there is using flexible, can dynamically be loaded the advantages of, reduce kernel
Volume, save the memory of system.But its disadvantage is also extremely obvious: using trouble, every subsystem are required to when starting from outer
Portion's load driver causes system starting slower.Moreover, booting is required to re-create device node every time, device node is created
More starting up's time is occupied, causes system starting slower.This point uses embedded in set-top box, mobile phone etc.
Show especially prominent in the electronic product of Linux system, because these electronic product functions are more and more, the personalization needed is set
It is standby drive it is more and more, thus in loading equipemtn drive and create device node take time it is more and more, and when system starting
Between (available machine time) be therefore very important technical indicator of this kind of product is easy to limit product performance and mentions again
It rises.
Summary of the invention
The present invention creates the existing above problem for device node in the prior art and provides a kind of creation equipment section
The method and apparatus of point, realize the creation of quick, dynamic device node.
For achieving the above object, method provided by the invention, which adopts the following technical solutions, is achieved:
A method of creation device node, the method includes the following steps:
A, storage includes device drives title, device node title in the form of text file in device file memory
With the device drives listed files of relevant parameter;
B, judge whether there is device node corresponding with device drives to be loaded in device file memory, if
Have, execute following step c, if nothing, executes following step d and e;
C, it will be stored in device file memory, in device node corresponding with device drives to be loaded is copied to
In depositing;
D, device drives listed files is read, is driven according to list content loading equipemtn, device node number is obtained;
E, set corresponding with the device drives of load is created according to device drives listed files content and device node number
Slave node, and by the storage of the device node of creation into device file memory.
Method as described above judges whether have in device file memory according to following step in the step b
Device node corresponding with device drives to be loaded:
It whether there is device node in device node storage catalogue in b01, lookup device file memory;
B02, when there are device node, read corresponding when being stored in device file memory, device node creation
Device drives listed files edit session T1;
B03, the edit session T2 for obtaining the corresponding device drives listed files of device drives to be loaded;
B04, when T1 is identical as T2, determine device file memory in have it is corresponding with device drives to be loaded
Device node determines that the device node stored and the device drives of load are not right in device file memory in the two difference
It answers.
Method as described above causes system starting abnormal, in device file memory to avoid resource contention
In device node storage catalogue there are device node and device node and device drives to be loaded not to it is corresponding when first delete institute
There is device node, then executes the step d and e again.
Method as described above, for convenient for be recycled, further include following step after the step e:
F, the volume of device drives listed files corresponding when device node creation is stored in device file memory
Collect the time.
Method as described above, to avoid repeating creating device node, further increasing creation speed, in the step e
In, device node is created according to following sub-steps:
E01, the device node title that device node to be created is obtained from device drives listed files;
E02, the device node number that system is distributed after loading the corresponding device drives of the device node is obtained;
E03, judge in memory whether there is same names device node, in the absence of, execute step e05, depositing
When, execute step e04;
E04, the equipment for judging the device node number of the device node of same names and device node to be created in memory
Whether node number is identical, if it is different, executing step e05 abandons the creation of device node if they are the same;
E05, device node is created according to device node title and device node number.
Method as described above, the device node number include major device number and from device number, the step e04,
In memory the major device number of the device node of same names and major device number from device number and device node to be created and from
When device number is all the same, determines that the device node number of two device nodes is identical, abandon the creation of device node.
Method as described above, the device file memory espespecially flash memory.
To realize aforementioned invention purpose, device provided by the invention adopts the following technical solutions to realize:
A kind of device creating device node, which includes device file memory and device node creation module,
Device node memory includes:
Device drives listed files storage unit, storage includes device drives title, equipment section in the form of text file
The device drives listed files of point title and relevant parameter;
Device node storage unit, for the device node of storage system kernel creation;
Device node creation module includes:
Device drives listed files reading unit is used to read device drives listed files from device file memory;
Device node judging unit, device node for determining to store in device file memory whether with it is to be loaded
Device drives are corresponding;
Device node loading unit is connected with device node judging unit, is stored according to judgement result from device file
Loading equipemtn node is into Installed System Memory in device;
Device drives loading unit drives for loading equipemtn;And
Device node creating unit is connected with device node judging unit and device drives listed files reading unit,
The corresponding device node of device drives for creating with loading.
Method as described above further includes having list edit time memory cell in the device file memory, is used for
The edit session T1 of corresponding device drives listed files when the device node creation stored in storage external storage;
The device node creation module further includes having:
List edit time acquisition unit, the volume of the corresponding device drives listed files of device drives for obtaining load
Collect the T1 stored in time T2 and list edit time memory cell;
Edit session comparing unit is connected with list edit time acquisition unit and device node judging unit, is used for
Whether identical compare T1 and T2, and comparison result is exported to the device node judging unit.
Method as described above, which is characterized in that the device node creation module further include:
Device node output unit, for being written the device node of creation to the equipment section of the device file memory
Point storage unit;And
Device node repeats judging unit, for repeating in decision-making system memory with the presence or absence of with device node to be created
Node.
Compared with prior art, the advantages and positive effects of the present invention are: the present invention by device drives listed files with text
This document form is stored on device file memory, the dynamic creation of device node is realized by read list, so that equipment
The management of driving is easier, efficient;Be stored in device file memory after using creation primary when creating device node,
The copy method being directly copied to from device file memory in memory when using later, effectively shortens creation device node
The consumed time improves system boot starting speed.
After a specific embodiment of the invention is read in conjunction with the figure, the other features and advantages of the invention will become more clear
Chu.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of device one embodiment of present invention creation device node;
Fig. 2 is the main flow chart of method one embodiment of present invention creation device node;
Fig. 3 is the sub-process figure for judging whether to need reconstructing apparatus node in Fig. 2 embodiment;
Fig. 4 is the sub-process figure that device node is created in Fig. 2 embodiment.
Specific embodiment
The technical scheme of the present invention will be explained in further detail with reference to the accompanying drawings and detailed description.
Referring to FIG. 1, the Fig. 1 show the structural schematic diagram of device one embodiment of present invention creation device node.
As shown in Figure 1, the device of the embodiment includes device node creation module 11 and device file memory 12,
In, device file memory 12 is independently of the storage equipment of memory, such as flash memory.
Device file memory 12 includes device drives listed files storage unit 121, list edit time storage list
Member 122 and device node storage unit 123.Wherein, device drives listed files storage unit 121 is stored in the form of text file
Device drives listed files includes that device drives title, device node title are related to needed for creation node in the list
The information such as parameter.List edit time memory cell 122 is used to store the device node stored in device file memory 12
The edit session T1 of corresponding device drives listed files when creation may determine that whether device node needs using the edit session
It re-creates, specifically please refers to the description of following method.And device node storage unit 123 is for storage devices node creation
The device node that module 11 creates, which is stored in device file memory 12 in the form of backing up, for device node
Creation module 11 copies, and can significantly improve system starting speed, and concrete principle and realization process please refer to following method flow
Description.
The function and interconnected relationship of unit part and each unit that device node creation module 11 includes are as described below:
Device drives loading unit 111 is connected with device drives listed files reading unit 112, is used to according to equipment
Drive the device drives title dynamically load device drives in listed files into device node creation module 11.
Device drives listed files reading unit 112 is deposited for the device drives listed files of device file memory 12
Device drives listed files is read in storage unit 121 into device node creation module 11, to carry out the dynamic of device drives
Load and the dynamic creation of device node.
On the one hand list edit time acquisition unit 113 is used to store from the list edit time of external storage 12
Corresponding device drives listed files when the device node creation stored in device file memory 12 is obtained in unit 122
On the other hand edit session T1 is used to obtain the edit session of the corresponding device drives listed files of device drives to be loaded
T2。
Edit session comparing unit 114 is connected with list edit time acquisition unit 113, for comparing T1 and T2 is
It is no identical, and export comparison result.
The purpose that above-mentioned list edit time acquisition unit 113 and edit session comparing unit 114 is arranged is to utilize list
For edit session to determine whether needing to re-create device node, concrete principle and application method please refer to following method flow
Description.
Device node judging unit 115, with edit session comparing unit 114 and device drives listed files reading unit
112 are connected, and judge equipment according to the information in the output result of edit session comparing unit 114 and device drives listed files
Whether the device node stored in file memory 12 is corresponding with device drives to be loaded.When determining corresponding, will control
Device node loading unit 119 connected to it is made to load from the device node storage unit 123 of device file memory 12
Device node is into device node creation module 11;In determining device file memory 12 device node that stores with it is to be loaded
Device drives when being not correspond to, device node creating unit 116 connected to it will be controlled and re-create equipment with load
Drive corresponding device node.
It, will be according to device drives listed files when creating device node for device node creating unit 116
The judgement result that the listed files and device node that reading unit 112 is read repeat judging unit 117 carrys out work, to be created that just
True device node.Specific creation process please refers to the process description of following methods.
Device node creating unit 116 is also connected with device node output unit 118, in device node creating unit 116
After newly creating device node, device node will be written to device file memory by device node output unit 118
In 12 device node storage unit 123, the backup of device node is realized, for subsequent copies use.
The more specific working principle of above-mentioned apparatus and process please refer to the description of following method.
Please refer to the embodiment of the method for Fig. 2 to present invention creation device node illustrated in fig. 4, wherein Fig. 2 is the implementation
The main flow chart of example, Fig. 3 is the sub-process figure for judging whether to need reconstructing apparatus node, and Fig. 4 is the son for creating device node
Flow chart.
Firstly, briefly explaining the technical background of the embodiment:, will for linux system for an embedded system
Basic, general device drives static compilation can add in kernel into system kernel in system starting automatically in system
It carries device drives and creates corresponding device node.And for most of personalized device drives, it is only with modular form
It stands on kernel and stores, be dynamically to be loaded in use, correspondingly, the corresponding device node of dynamic creation device drives.
The device drives load that the embodiment to be told about, which refers to, to be moved to independently of kernel with device drives existing for modular form
State load, correspondingly, referring to the dynamic creation for driving and carrying out to this equipment component when the creation of device node.
Moreover, the basic thought of the embodiment is briefly described below: will be loaded with device drives and device node creation has
Device drives title, device node title and the relevant parameter of pass are organized into device drives listed files in the form of text file,
The list is stored in advance in a device file memory independently of memory, embedded system is preferably stored in
In flash memory.Then, certain technological means will be taken, whether device node is such as judged according to the label on flash
It was created in last time starting, if created, system copies device node stored on flash for automatic.If
It does not create, by automatic read list file, is successively created that all device nodes, while device node being saved in
As backup on flash.Since the copy node time spent can be ignored compared to the time required to creating all nodes, and
Since node is created than relatively time-consuming, thus such method can significantly improve system start-up time.After this method, only
The first time of system starting, device node automatically creates once, in the case where device drives listed files does not update, with
Every subsystem starting just only needs copying equipment node afterwards, thus has not only realized the dynamic process of device node creation, but also energy
Enough guarantee the starting speed of system.
Moreover, device drives and device node information are stored in the form of text file, it is not only simple in structure clear, reading
It takes conveniently, and is convenient for the editor such as being added, delete manually, convenient for management and use.
The embodiment creates the main flow of device node as shown in Fig. 2, the embodiment is stored using flash as device file
Device, and when executing the main flow, to be stored in the form of text file in flash in advance include device drives title, is set
The device drives listed files of slave node title and relevant parameter.Detailed process is as follows:
Step 201: process starts.
Step 202: judging whether device node needs to rebuild.If desired, step 203 is executed to 209;If not needing, hold
Row step 210 is to 212.
Judgment method and process can refer to Fig. 3 and below to the descriptions of Fig. 3.
Step 203: when needing reconstructing apparatus node, all devices node of storage has been backed up on deletion flash first.
If device drives listed files is updated, it is likely that need reconstructing apparatus node.And in creation equipment
When node, need to re-create all device nodes, this is because when creating device node every time, what system was distributed
Device node number is very likely different, if only partially re-creating, partially remaining unchanged, it may occur however that resource contention and cause
System can not normally start.Therefore, when needing reconstructing apparatus node, first by all devices node stored on flash
All delete.Certainly, it is created if it is first time, there is no device nodes, then need not execute the delete operation.
Step 204: reading device file list, circulation obtains the device drives title of each device drives, device node
Title and relevant parameter.
The process is to be read into memory the device file list in flash memory, quickly to be handled.
Step 205: being driven according to the device drives title loading equipemtn in list, to obtain the device node of system distribution
Number.
Step 206: creating device node corresponding with the device drives of load.
The specific creation process of device node please refers to Fig. 4 and below to the description of Fig. 4.
Step 207: judging whether whole nodes complete by creation.If so, executing step 208;If it is not, step 204 is gone to,
Continue to obtain next device drives information, completes the creation of device node.
Step 208: after the completion of all devices node creates, the device node created being copied to standby on flash
Part storage, for being called directly when the starting of lower subsystem.
Step 209: the corresponding list edit time when storage devices node on flash creates.Then, step is gone to
213。
Whether the embodiment judges whether device node needs to rebuild for convenience, edited using according to list come really
Fixed technological means.List edit time tag, the time of the time tag and list quilt are provided in device file list
The time of editor keeps synchronizing.After having re-created device node every time, the edit session is read, and the time is stored
Into flash.
Step 210: when determining not needing to re-create device node, reading device file list, circulation obtains each
Device drives title, device node title and the relevant parameter of device drives.
The process is to be read into memory the device file list in flash memory, quickly to be handled.
Step 211: being driven according to the device drives title loading equipemtn in list.
For device node creation, if you do not need to reconstructing apparatus node, which is not required step, because
It does not need to obtain device node number by loading equipemtn driving.But for an entire flow, the copy of device node
Be executed after having loaded device drives, so, the embodiment by loading equipemtn driving as create device node one
A step describes.
Step 212: device node corresponding with the device drives of load in flash is copied in kernel.Then, turn
To step 213.
In the starting of every subsystem, device drives are required to reload.And the device node for taking a long time creates
For, since backup has device node in flash, is not being changed, do not needed according to certain means judgement device node
When re-creating, then directly device node stored in flash is copied in kernel.Due to the copy of device node
Process is faster than creation process speed, therefore, the time of system starting is greatly saved.
Step 213: main flow terminates.
For judge device node whether need rebuild namely judge whether be stored in flash and equipment to be loaded
Corresponding device node is driven, is the key that guarantee system normally starts, raising system starts speed, the embodiment is using figure
3 process judges, specific as follows:
Step 301: creation is flexible coupling, and the device node catalogue of memory is made to be directed toward the device node storage catalogue on flash.
Thus, the device node storage catalogue of the accessible flash of memory, and content therein is handled.
Step 302: judging whether there is device node in device node storage catalogue.If so, executing step 303;If not yet
Have, goes to step 307.
Step 303: when having device node in catalogue, reading corresponding equipment when device node creation in flash
Drive the edit session T1 of listed files.
As previously mentioned, corresponding equipment is driven when can store device node creation in flash when alternate device node
The edit session of dynamic listed files, the time are denoted as T1, which will read the time.
Step 304: obtaining the edit session T2 of the corresponding device drives listed files of device drives of load.
If device drives are updated, corresponding device drives listed files can be edited, then programming again
Into flash, which is usually to occur in product up-gradation.Moreover, will be recorded when device drives listed files is edited
List time to be edited, the time are denoted as T2.
Step 305: judging whether T1 and T2 is identical.If so, executing step 306;If it is not, going to step 307.
Step 306: when T1 and T2 is identical, judgement does not need reconstructing apparatus node, and step will be executed in Fig. 2 main flow
210。
If T1 is identical as T2, illustrate that existing device node is most for existing device drives listed files
New, namely after creating device node, device drives listed files is not updated.Thus, device node at this time with
Device drives are consistent, and to avoid newly creating node cost longer time, do not need to re-create device node.
Step 307: device node being not present in device node storage catalogue, or if T1 is different from T2, determine to need
Reconstructing apparatus node will execute step 203 in Fig. 2 main flow.
Wherein, if T1 is not identical as T2, illustrate that device drives listed files was edited, and also not according to editor after
Device drives listed files establish device node namely existing device node relative to existing device drives listed files
For be not it is newest, to guarantee the consistent of device drives and device node, need to re-create device node.Due to creating again
Construction slave node only needs to create in the first time system starting process after device drives listed files was edited, and is arranging
In the immovable situation of table, the start-up course in later period does not need to create again, thus when will be greatly reduced the overall startup of system yet
Between.
Above-mentioned Fig. 3 is only illustrated using edit session as a kind of realization side for judging whether to need reconstructing apparatus node
Formula, but not limited to this, it can also be judged according to actual needs using other modes.
The step 206 that device node is created in Fig. 2 main flow specifically can be using the creation sub-process shown in Fig. 4 come real
Existing, detailed process is as follows:
Step 401: the device node title of device node to be created is obtained from device drives listed files.
Creation device node will be referred to as suction parameter with device node name, therefore, obtain device node title first.
Step 402: obtaining the device node number that system is distributed after loading the corresponding device drives of the device node.
System can allocate a device node number for the device drives automatically after loading equipemtn driving, the node number
By the mark together with nodename, as a device node.
Step 403: judging in system kernel with the presence or absence of the device node with title.If so, executing step 404;If it is not,
Go to step 407.
To avoid the repetition of devices in system node from creating, which is set and is judged.It in this example, will be according to setting
Slave node title and device node number are judged one by one.
Step 404: if there is the device node with title in kernel, then judging that the master of the device node of same title sets
Whether standby number identical.If they are the same, 405 are executed;If it is different, going to step 407.
Device node number generally comprises major device number and from device number, which will judge one by one.
Step 405: when identical with the major device number of the device node of title, judging the slave equipment of the two device nodes
It is number whether identical.If they are the same, step 406 is executed;If it is not the same, thening follow the steps 407.
Step 406: the major device number of the device node of same title and from device number it is all the same when, illustrate to be created sets
Slave node with it is already present identical with title device node, then abandon the creation of device node, use already present device node.
The execution speed of above-mentioned deterministic process is faster than the speed for creating a device node, so, if it is determined that it is identical,
A node is no longer re-created, and can be improved node creation speed and efficiency.
Step 407: if there is no the major device numbers of the device node with title or the device node with title in kernel
Or from device number difference, then determine that there is no identical device nodes in kernel, then according to setting in device drives listed files
The device node number of slave node title, relevant parameter and system distribution creates device node.
It should be noted that in the step 407, if there is same title but the device node of different node numbers, to keep away
Exempt from confusion, first delete already present same title device node, creates new set further according to device node title and device node number
Slave node.
The above embodiments are merely illustrative of the technical solutions of the present invention, rather than is limited;Although referring to aforementioned reality
Applying example, invention is explained in detail, for those of ordinary skill in the art, still can be to aforementioned implementation
Technical solution documented by example is modified or equivalent replacement of some of the technical features;And these are modified or replace
It changes, the spirit and scope for claimed technical solution of the invention that it does not separate the essence of the corresponding technical solution.
Claims (7)
1. a kind of method for creating device node, which is characterized in that the method includes the following steps:
Judge whether there is device node corresponding with device drives to be loaded in device file memory;
If so, obtain the device node prestored from device file memory, and by the device node got with
The corresponding device node of device drives to be loaded is copied in memory;
If it is not, then driven according to the content loading equipemtn of the device drives listed files prestored, acquisition device node number, and according to
Device drives listed files content and device node number create device node corresponding with device drives to be loaded;
Wherein, judge whether there is device node corresponding with device drives to be loaded in device file memory described, have
Body includes:
Obtain the edit session of corresponding device drives listed files when the device node creation stored in device file memory
T1, and obtain the edit session T2 of the corresponding device drives listed files of device drives to be loaded;
When T1 and T2 is identical, determines and preserve equipment section corresponding with device drives to be loaded in device file memory
Point determines equipment section not corresponding with device drives to be loaded in device file memory in T1 and T2 not identical
Point.
2. the method according to claim 1, wherein in the device drives listed files that the basis prestores
Hold loading equipemtn driving the step of before further include: in determining device file memory not with device drives phase to be loaded
Corresponding device node then deletes all devices node saved in the device file memory.
3. according to the method described in claim 2, it is characterized in that, described according to device drives listed files content and equipment
Node number creates after device node corresponding with device drives to be loaded further include:
Equipment corresponding when device node corresponding with device drives to be loaded creation is stored in device file memory
Drive the edit session of listed files.
4. according to the method described in claim 3, it is characterized in that, the device drives listed files content that prestores of the basis and
Device node number creates device node corresponding with device drives to be loaded and specifically includes:
The device node title of device node to be created is obtained from the device drives listed files;
Judge whether there is device node identical with the device node title in memory, if it is not, then according to the device drives
Listed files and device node number create device node, if so, judging the equipment section of the device node of same names in memory
Whether point number is identical as the device node number of device node to be created, if so, the creation of device node is abandoned, if it is not, then
Device node is created according to the device drives listed files and device node number.
5. according to the method described in claim 4, it is characterized in that, the device node number includes major device number and from equipment
Number, judge that the device node number of the device node of same names is identical as the device node number of device node to be created in memory
It specifically includes: if the major device number of the device node of same names and the master from device number and device node to be created in memory
Device number and it is all the same from device number when, determine that the device node number of two device nodes is identical.
6. a kind of device for creating device node, which is characterized in that the device includes device file memory and device node
Creation module,
Device node creation module includes:
Device node judging unit, for judging whether there be set corresponding with device drives to be loaded in device file memory
Slave node;
Device node loading unit is connected with device node judging unit, according to when determine result be when, from device file
The device node prestored is obtained in memory, and will be corresponding with device drives to be loaded in the device node got
Device node be copied in memory;
Device drives loading unit, for the content loading equipemtn driving according to the device drives listed files prestored;And
Device node creating unit is connect, for obtaining device node number, and according to equipment with the device node judging unit
Listed files content and device node number is driven to create device node corresponding with device drives to be loaded;Wherein, described to set
It include list edit time memory cell in standby file memory, corresponding device drives when for storage devices node creation
The edit session T1 of listed files;
The device node creation module further includes having:
List edit time acquisition unit, when for obtaining the editor of the corresponding device drives listed files of device drives loaded
Between the T1 that stores in T2 and list edit time memory cell;
Edit session comparing unit is connected, for comparing with list edit time acquisition unit and device node judging unit
Whether T1 and T2 is identical, and comparison result is exported to the device node judging unit.
7. device according to claim 6, which is characterized in that the device node creation module further include:
Device node output unit, the device node for being written the device node of creation to the device file memory are deposited
Storage unit;And
Device node repeats judging unit, for whether there is and the duplicate section of device node to be created in decision-making system memory
Point.
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 CN105573809A (en) | 2016-05-11 |
CN105573809B true 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) |
Families Citing this family (3)
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 |
CN112148229B (en) * | 2020-10-12 | 2024-01-30 | 北京计算机技术及应用研究所 | Method for accelerating read-write efficiency of nonvolatile memory under Feiteng server platform |
Citations (1)
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 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0584909A1 (en) * | 1992-08-26 | 1994-03-02 | Sun Microsystems, Inc. | Self configuring device system |
KR100825720B1 (en) * | 2005-12-08 | 2008-04-29 | 한국전자통신연구원 | File management method in file system and metadata server for the same |
CN101520756A (en) * | 2009-04-07 | 2009-09-02 | 深圳华为通信技术有限公司 | Equipment driving method, equipment driving device and communication 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 (1)
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 |
Also Published As
Publication number | Publication date |
---|---|
CN102999353B (en) | 2016-02-03 |
CN105573809A (en) | 2016-05-11 |
CN102999353A (en) | 2013-03-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102779072B (en) | Embedded system and dormancy and wake-up method of application process thereof | |
CN105528368B (en) | A database migration method and device | |
CN102841674B (en) | Embedded system based on novel memory and hibernation and awakening method for process of embedded system | |
WO2010035596A1 (en) | Firmware update device and method | |
CN106227621B (en) | The data back up method and system of logic-based volume management simplification volume | |
CN107870769A (en) | The installation method and device of operating system | |
US20090037554A1 (en) | Migrating workloads using networked attached memory | |
EP2310940A1 (en) | Synchronizing virtual machine and application life cycles | |
JP2007219866A (en) | How to build a business operation environment | |
CN105573809B (en) | Create the method and device of device node | |
CN109947536A (en) | A kind of PostgreSQL Automation arranging method based on Kubernetes | |
CN109960517A (en) | Production method, device, system and the storage medium of image file | |
CN108345477A (en) | A kind of double-mirror shares the design method and device of conf partitioned files | |
CN105389190B (en) | A kind of method, apparatus and system of os starting | |
WO2011027626A1 (en) | Memory management method, computer system and computer readable medium | |
CN104424115B (en) | Recover method, storage device and the electronic equipment of the preset state of electronic equipment | |
CN104021022A (en) | Partition adjusting method and electronic equipment | |
CN114385349A (en) | Container group deployment method and device | |
CN111158709A (en) | Cluster deployment method, device and equipment and computer readable storage medium | |
CN103777955A (en) | Method and device for installing and operating Unix-like in Windows environment | |
CN100468344C (en) | Perspective communication method between super operating system and its intermedium | |
JP3941597B2 (en) | Logical partitioned computer system | |
CN102799449A (en) | Multi-system starting method and system | |
JP2011164759A (en) | Method, device, and program for updating bios | |
KR20100067248A (en) | Method for managing swap space for flash memory based swap storage device |
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 |