CN104407994B - The method and device for the storage device inserted on identification computer slot - Google Patents

The method and device for the storage device inserted on identification computer slot Download PDF

Info

Publication number
CN104407994B
CN104407994B CN201410604781.5A CN201410604781A CN104407994B CN 104407994 B CN104407994 B CN 104407994B CN 201410604781 A CN201410604781 A CN 201410604781A CN 104407994 B CN104407994 B CN 104407994B
Authority
CN
China
Prior art keywords
slot
storage device
preset
profile
feedback message
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.)
Expired - Fee Related
Application number
CN201410604781.5A
Other languages
Chinese (zh)
Other versions
CN104407994A (en
Inventor
刘庆灶
魏鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Meiya Pico Information Co Ltd
Original Assignee
Xiamen Meiya Pico Information Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xiamen Meiya Pico Information Co Ltd filed Critical Xiamen Meiya Pico Information Co Ltd
Priority to CN201410604781.5A priority Critical patent/CN104407994B/en
Publication of CN104407994A publication Critical patent/CN104407994A/en
Application granted granted Critical
Publication of CN104407994B publication Critical patent/CN104407994B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/105Program control for peripheral devices where the programme performs an input/output emulation function

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a kind of method and device for the storage device for identifying and being inserted on computer slot, method includes:Detect and whether there is the first profile with the first preset features under the first preset catalogue;If in the presence of the first profile, the first position information for having the first slot that storage device is inserted before os starting is obtained according to the first profile;Obtain the second profile under the catalogue of the first profile, and according to the second profile obtain the storage device that is inserted into the first slot under the second preset catalogue corresponding to the first implementor name, first position information is got with basis and the first implementor name identifies the storage device inserted in the first slot and storage device is operated.This method can solve the problems, such as the slot position that changes of identification that existing None- identified has been inserted into the storage device in slot before system startup and can not adaptively, can improve recognition efficiency, and the efficiency that raising is operated to the storage device identified.

Description

The method and device for the storage device inserted on identification computer slot
Technical field
The present invention relates to computer realm, more particularly to a kind of method for identifying the storage device inserted on computer slot And device.
Background technology
Nowadays the use of computer is more and more common, can be provided with computer multiple for inserting inserting for storage device Groove, when any slot is inserted into, the operating system of computer needs that the storage device for inserting the slot is identified, then right The storage device carries out subsequent operation (for example read, the essential information that writes, obtain the storage device etc.).
With the fast development of electronic information industry, incident Information Crimes activity is also more and more, Information Crimes The storage device for being stored with Crime Information would generally be related to, therefore, how the information in quick obtaining storage device is very Important.
The information obtained in storage device is identified firstly the need of to the storage device in insertion slot, at present, Using hardware binding scheme in windows operating systems, that is, by the slot position information in operating system with it is preset Slot mark one-to-one corresponding gets up, but there are the following problems for such a scheme based on Windows operating system:First, work as slot , then can not be again according to original corresponding relation when position is artificially changed, slot damage, slot position caused by system upgrade etc. change Identify the slot after change in location;Second, the storage device that the usual None- identified of system is just already inserted into before system startup;Three It is that, because Windows operating system is the operating system of a closing, the customizability of user is poor and needs to pay, therefore, on It is difficult to be changed according to user's request to state hardware binding scheme.
In a word, the scheme for the storage device inserted on existing identification computer slot is preferable not enough.
The content of the invention
The invention provides a kind of method and device for the storage device for identifying and being inserted on computer slot, based on Linux Operating system, can solve existing None- identified and the storage device in slot be had been inserted into before system startup and can not be adaptive Identification change slot position the problem of, recognition efficiency can be improved, and then improve and the storage device identified is carried out The efficiency of operation.
According to an aspect of the present invention, the present invention proposes a kind of side for the storage device for identifying and being inserted on computer slot Method, wherein, the operating system of computer is linux system, default identification application is provided with advance in a computer, in computer Operating system and default identification application all under starting state, methods described includes:
Detect and whether there is the first profile with the first preset features under the first preset catalogue;
If in the presence of the first profile, obtained according to first profile and deposited before os starting Store up the first position information of the first slot of equipment insertion;
The second profile under the catalogue of the first profile is obtained, and is obtained and inserted according to second profile To the storage device in first slot under the second preset catalogue corresponding to the first implementor name, with according to getting first Confidence ceases and the first implementor name identifies the storage device inserted in the first slot and the storage device is operated.
Further, methods described also includes:
Detect and whether there is the second profile with the second preset features under the first preset catalogue;
If in the presence of the second profile, the slot of operating system hard disk insertion is obtained according to second profile Second place information;
The second place information is stored in the first preset configuration file, will pass through, reading described first is preset to match somebody with somebody File is put to identify the position of the slot of insertion operation system disk.
Further, methods described also includes:
If the first profile is not present, by calling preset function to monitor the first feedback message, described Feedback message when one feedback message is the event generation for indicating storage device insertion;
If capturing first feedback information, determine to there is storage device to insert according to first feedback message the Storage device in the second slot of the second place information of two slots and insertion corresponding implementor name in systems.
Further, methods described also includes:
By calling preset function to monitor the second feedback message, second feedback message is to indicate that storage is set Feedback message when the standby event extracted occurs;
If capturing second feedback message, determine to there is storage device to extract according to second feedback message the 3rd positional information of three slots and the storage device corresponding implementor name in systems extracted from the 3rd slot.
Further, methods described also includes:
The position of the slot to determine will be monitored by the first feedback message to preset function and the second feedback message Confidence ceases to be stored in preset second configuration file with the corresponding relation of preset slot numbering, and described second is read will pass through Configuration file obtains the positional information of slot.
According to another aspect of the present invention, the invention also provides a kind of storage device for identifying and being inserted on computer slot Device, wherein, the operating system of computer is linux system, is provided with default identification application in advance in a computer,
Described device includes:
First detection unit, under being applied in the operating system of computer and default identification all in starting state, inspection Survey and whether there is the first profile with the first preset features under the first preset catalogue;
First acquisition unit, in the case where the first profile be present, then being obtained according to first profile Take the first position information of the first slot of existing storage device insertion before os starting;
Second acquisition unit, the second profile under catalogue for obtaining the first profile, and according to described the Two profiles, which obtain, is inserted into first implementor name corresponding under the second preset catalogue of the storage device in first slot, With according to getting first position information and the first implementor name identifies the storage device inserted in the first slot and deposited to described Storage equipment is operated.
Further, described device also includes:
Second detection unit, it is preset with the presence or absence of second with the second preset features under the first preset catalogue for detecting File;
3rd acquiring unit, in the case where the second profile be present, then being obtained according to second profile The second place information of the slot of extract operation system disk insertion;
First memory cell, for the second place information to be stored in the first preset configuration file, will pass through The first preset configuration file is read to identify the position of the slot of insertion operation system disk.
Further, described device also includes:
First monitoring unit, in the case of in the absence of the first profile, then by calling preset function to One feedback message is monitored, and feedback when first feedback message is the event generation for indicating storage device insertion disappears Breath;
First determining unit, for when capturing first feedback information, then being determined according to first feedback message There is the storage device in the second slot of second place information and insertion of the second slot of storage device insertion to correspond in systems Implementor name.
Further, described device also includes:
Second monitoring unit, for by calling preset function to monitor the second feedback message, described second to feed back Message is to indicate the feedback message when event that storage device is extracted occurs;
Second determining unit, for when getting second feedback message, then being determined according to second feedback message The storage device for having the 3rd positional information of the 3rd slot of storage device extraction and being extracted from the 3rd slot corresponds in systems Implementor name.
Further, described device also includes:
Second memory cell, for will be monitored by the first feedback message to preset function and the second feedback message And the positional information of the slot determined and the corresponding relation of preset slot numbering are stored in preset second configuration file, so as to The positional information of slot is obtained by reading second configuration file.
According to specific embodiment provided by the invention, the invention discloses following technique effect:
The method and device for the storage device inserted on the identification computer slot of the embodiment of the present invention, this method and device Realization be based on (SuSE) Linux OS, take full advantage of the increasing income of linux system, customizability is strong and free characteristic, can lead to Preset catalogue and profile are crossed to obtain the positional information for the slot for inserting storage device, the implementor name of storage device and evidence This come identify insertion slot in storage device, with to storage device carry out associative operation, can not only solve in the prior art None- identified have been inserted into the storage device in slot before system startup and can not adaptively identification change it is slotting The problem of groove location, recognition efficiency can be also improved, and then improve the efficiency operated to the storage device identified.
Certainly, any product for implementing the present invention it is not absolutely required to reach all the above advantage simultaneously.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to institute in embodiment The accompanying drawing needed to use is briefly described, it should be apparent that, drawings in the following description are only some implementations of the application Example, for those of ordinary skill in the art, on the premise of not paying creative work, can also be obtained according to these accompanying drawings Obtain other accompanying drawings.
Fig. 1 is the schematic flow sheet of the embodiment of the method for the storage device inserted on present invention identification computer slot;
Fig. 2 is the structural representation of the device embodiment for the storage device inserted on present invention identification computer slot.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only some embodiments of the present application, rather than whole embodiments.It is based on Embodiment in the present invention, the every other embodiment that those of ordinary skill in the art are obtained, belong to the application protection Scope.
" first ", " second " in illustrating below etc. enter just for the sake of the clearer step in the embodiment of the present invention Restriction effect (such as first, second etc. be not intended to be limited in sequence meaning) is not played in row description.
Referring to Fig. 1, the flow for the embodiment of the method for the storage device inserted on present invention identification computer slot is illustrated Figure.
In this embodiment, the operating system of computer is linux system, and is provided with advance in computer for identifying The default identification application for the storage device inserted in computer slot, it is to make full use of linux system using linux system Increase income, customizability is strong and completely free characteristic, brought with to solve the hardware binding scheme in existing Window systems Problem.
In the case where the operating system of computer and default identification are applied all in starting state, this method comprises the following steps:
S101, detect and whether there is the first profile with the first preset features under the first preset catalogue.
By studying the characteristic of linux system, (it is included in behaviour after insertion storage device in the slot of computer Storage device is inserted into the situation in slot before making system startup) " it can then produced under/sys " catalogues preset with first The file of feature, such as " " 0 under/sys/bus/scis/devices " catalogue:0:0:0 " file, wherein, " 0:0: 0:The file path of display then may indicate that the positional information of storage device storage after 0 ".
Therefore, "/sys " catalogues can be the first preset catalogue, " 0:0:0:0 " can be the first preset features, can detect accordingly It is " 0 whether to have form under "/sys " catalogues:0:0:0 " the first profile.
S102, if in the presence of the first profile, obtained according to first profile before os starting The first position information of first slot of existing storage device insertion.
First profile such as can be as follows:
1 root root of lrwxrwxrwx 0 July 18 09:15 0:0:0:0->../../../devices/ pci0000:00/0000:00:1f.2/host0/tatget0:0:0/000:000
Wherein, " devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0 is There is the first position information of the first slot of storage device insertion (being already inserted into before being included in os starting).
S103, the second profile under the first profile catalogue is obtained, and obtained according to second profile First implementor name corresponding under the second preset catalogue of the storage device in first slot is inserted into, with according to getting the One positional information and the first implementor name identify the storage device inserted in the first slot and the storage device are operated.
In the first profile, (form under i.e./sys " catalogues is " 0:0:0:0 " file) catalogue under also include " block " file, the storage device for then including being inserted in the first slot under " block " file is somebody's turn to do " corresponding to under/dev " catalogues Implementor name (by linux system study, when in slot insert storage device after then can "/dev " now generate correspondence Implementor name).
For example " block " file can be the second profile under the first profile catalogue, "/dev " catalogues can be the Two preset catalogues, then can first obtain " 0:0:0:" block " file under 0 " file directory, according to " block " text got Part obtains the storage device being inserted into the first slot in " the first implementor name caused by/dev " catalogues correspondence.
" block " file is somebody's turn to do, for example can be as follows:
10 root root of drwxr-xr-x 0 July 18 08:47sda
Wherein, " sda " is the first implementor name.
First position information " the devices/pci0000 of the first slot inserted according to the existing storage device of acquisition: 00/0000:00:1f.2/host0/target0:0:0/0:0:0:0 " and first implementor name " sda " first can be quickly recognized The storage device inserted in slot, after identifying the storage device, then the storage device can be read out, write, obtain base The operation such as this information.
Further, it whether there is the second preset text with the second preset features under also detectable first preset catalogue Part.
In linux system, generally it can also be produced under the first preset catalogue (i.e. "/sys " catalogues) preset with second The file of feature, such as " " 7 under/sys/bus/scis/devices " catalogue:0:0:0 " file, wherein, " 7:0: 0:The file path of display then may indicate that the positional information of the slot of operating system hard disk insertion after 0 ".
Therefore, " 7:0:0:0 " can be the second preset features, you can " it is " 7 whether to have form under/sys " catalogues for detection: 0:0:0 " the second profile.
If in the presence of the second profile, obtain what operating system hard disk inserted according to second profile
The second place information of slot.
Second profile such as can be as follows:
1 toot root of lrwxrwxrwx 0 July 18 09:19 7:0:0:0 ->../../../devices/ pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/host7/target7:0:0/7:0:0:0
Wherein, " devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/host7/ target/:0:0/7:0:0:The second place information of the 0 " slot then inserted for operating system hard disk.
And then the second place information of acquisition is stored in the first preset configuration file of operating system, read with will pass through The first preset configuration file is taken to identify the position of the slot of insertion operation system disk, and the slot is deposited with inserting other The slot of storage equipment distinguishes, and avoids with inserting the slot of other storage devices mutually obscuring the slot.
In addition, after the detection by S101, if testing result is in the absence of the first profile, then it represents that computer Also insert without storage device in slot, now the first feedback message of preset function is supervised using default identification application Listen, know the event for thering is storage device to insert people by getting the first feedback message.
, can be by calling preset function to thering is storage device to insert in slot after os starting in linux system The event entered is monitored, specifically, can be by calling preset function to the thing for representing to have storage device to insert in slot The first feedback message that part occurs is monitored, and then means there is storage device insertion in slot when capturing the first feedback message Event occur, and can be determined according to the first feedback message storage device insertion the second slot second place information and insertion The storage device of second slot corresponding implementor name in systems.
The preset function such as can be " socket (PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_ UEVENT) ", the first feedback message captured, it may include following content:
ACTION=add
DEVPATH=devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1.3:1.0/ host7/target7:0:0/7:0:0:0/block/sdb
SUBSYSTEM=block
DEVNAME=sdb
DEVTYPE=disk
Wherein, " add " can indicate storage device insertion, " devices/pci0000:00/0000:00:1a.0/usb1/ 1-1/1-1.3/1.3:1.0/host7/target7:0:0/7:0:0:0/block " can represent that the second of storage device insertion inserts The second place information of groove, " sdb " can represent the storage device that is inserted into the second slot corresponding implementor name in systems.
In addition, can also be by calling above-mentioned preset function " socket (PF_NETLINK, SOCK_DGRAM, NETLINK_ KOBJECT_UEVENT) " event extracted to the storage device in slot is monitored, specifically, can be above-mentioned pre- by calling Put the second feedback message that the event that function pair is used to represent to have in slot storage device to extract occurs to be monitored, when capturing Second feedback message, then mean the time for thering is storage device to extract in slot, and can be true according to second feedback information Surely the storage device for having the 3rd positional information of the 3rd slot of storage device extraction and being extracted from the 3rd slot is right in systems The implementor name answered.
In second feedback message, it may include following content:
ACTION=remove
DEVPATH=devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1.3:1.0/ host7/target7:0:0/7:0:0:0/block/sdb
SUBSYSTEM=block
DEVNAME=sdb
DEVTYPE=disk
Wherein, " remove " can indicate storage device extraction, " devices/pci0000:00/0000:00:1a.0/ usb1/1-1/1-1.3/1.3:1.0/host7/target7:0:0/7:0:0:0/block " can represent the of storage device insertion 3rd positional information of three slots, " sdb " can represent the storage device that is inserted into the 3rd slot corresponding equipment in systems Name.
Further, will can also be monitored above by the first feedback message to preset function and the second feedback message And the positional information of the slot determined and the corresponding relation of preset slot numbering are stored in preset second configuration file, so as to The positional information of slot can be obtained by reading second configuration file, and when the positional information of slot changes, only Preset second configuration file need to be modified, without being occurred by changing program to solve the positional information of slot The problem of changing and bringing, preferably tackled with this due to the positional information for the slot that system upgrade, hardware change etc. are brought The problem of change.
The method for the storage device inserted on the identification computer slot of the embodiment of the present invention, the realization of this method are based on (SuSE) Linux OS, takes full advantage of the increasing income of linux system, customizability is strong and free characteristic, can pass through preset catalogue And profile obtains the positional information for the slot for inserting storage device, the implementor name of storage device and identified accordingly The storage device inserted in slot, to carry out associative operation to storage device, can not only solve None- identified in the prior art and exist System have been inserted into the storage device in slot before starting and can not be adaptively the identification slot position that changes ask Topic, recognition efficiency can be also improved, and then improve the efficiency operated to the storage device identified, be particularly suitable for use in crime The evidence obtaining of evidence, it is greatly improved evidence obtaining efficiency.
The embodiment of the method for the storage device inserted on corresponding the invention described above identification computer slot, additionally provides identification The device embodiment for the storage device inserted on computer slot, is specifically described below in conjunction with the accompanying drawings.
Fig. 2 shows the structural representation of the device embodiment for the storage device inserted on the other computer slot of the present invention.
In this embodiment, the operating system of computer is linux system, and is provided with advance in computer for identifying The default identification application for the storage device inserted in computer slot.
The device includes:
First detection unit 21, under being applied in the operating system of computer and default identification all in starting state, Detect and whether there is the first profile with the first preset features under the first preset catalogue.
First acquisition unit 22, for exist the first profile in the case of, then according to first profile Obtain the first position information of the first slot of existing storage device insertion before os starting
Second acquisition unit 23, the second profile under catalogue for obtaining the first profile, and according to described Second profile, which obtains, is inserted into first equipment corresponding under the second preset catalogue of the storage device in first slot Name, with according to getting first position information and the first implementor name identifies the storage device inserted in the first slot and to described Storage device is operated.
Further, the device may also include:
Second detection unit, it is preset with the presence or absence of second with the second preset features under the first preset catalogue for detecting File.
3rd acquiring unit, in the case where the second profile be present, then being obtained according to second profile The second place information of the slot of extract operation system disk insertion.
First memory cell, for the second place information to be stored in the first preset configuration file, will pass through The first preset configuration file is read to identify the position of the slot of insertion operation system disk.
Further, the device may also include:
First monitoring unit, then can be by calling preset function pair in the case of in the absence of the first profile First feedback message is monitored, and feedback when first feedback message is the event generation for indicating storage device insertion disappears Breath.
First determining unit, for when capturing first feedback information, then being determined according to first feedback message There is the storage device in the second slot of second place information and insertion of the second slot of storage device insertion to correspond in systems Implementor name.
Further, the device may also include:
Second monitoring unit, for by calling preset function to monitor the second feedback message, described second to feed back Message is to indicate the feedback message when event that storage device is extracted occurs.
Second determining unit, for when capturing second feedback message, then being determined according to second feedback message The storage device for having the 3rd positional information of the 3rd slot of storage device extraction and being extracted from the 3rd slot corresponds in systems Implementor name.
In addition, the device may also include:
Second memory cell, for will be monitored by the first feedback message to preset function and the second feedback message And the positional information of the slot determined and the corresponding relation of preset slot numbering are stored in preset second configuration file, so as to The positional information of slot is obtained by reading second configuration file.
The device for the storage device inserted on the identification computer slot of the embodiment of the present invention, the realization of the device are based on (SuSE) Linux OS, takes full advantage of the increasing income of linux system, customizability is strong and free characteristic, can pass through preset catalogue And profile obtains the positional information for the slot for inserting storage device, the implementor name of storage device and identified accordingly The storage device inserted in slot, to carry out associative operation to storage device, can not only solve None- identified in the prior art and exist System have been inserted into the storage device in slot before starting and can not be adaptively the identification slot position that changes ask Topic, recognition efficiency can be also improved, and then improve the efficiency operated to the storage device identified, be particularly suitable for use in crime The evidence obtaining of evidence, it is greatly improved evidence obtaining efficiency.
As seen through the above description of the embodiments, those skilled in the art can be understood that the application can Realized by the mode of software plus required general hardware platform.Based on such understanding, the technical scheme essence of the application On the part that is contributed in other words to prior art can be embodied in the form of software product, the computer software product It can be stored in storage medium, such as ROM/RAM, magnetic disc, CD, including some instructions are causing a computer equipment (can be personal computer, server, either network equipment etc.) performs some of each embodiment of the application or embodiment Method described in part.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment Divide mutually referring to what each embodiment stressed is the difference with other embodiment.Especially for device or For device embodiment, because it is substantially similar to embodiment of the method, so describing fairly simple, related part is referring to method The part explanation of embodiment.Device and device embodiment described above is only schematical, wherein the conduct The unit that separating component illustrates can be or may not be it is physically separate, can be as the part that unit is shown or Person may not be physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can root Factually border needs to select some or all of module therein realize the purpose of this embodiment scheme.Ordinary skill Personnel are without creative efforts, you can to understand and implement.
The method and device of the storage device to being inserted on identification computer slot provided by the present invention is carried out above It is discussed in detail, specific case used herein is set forth to the principle and embodiment of the application, above example Illustrate that being only intended to help understands the present processes and its core concept;Meanwhile for those of ordinary skill in the art, according to According to the thought of the application, there will be changes in specific embodiments and applications.In summary, this specification content It should not be construed as the limitation to the application.

Claims (8)

1. a kind of identify the method for storage device inserted on computer slot, it is characterised in that the operating system of computer is Linux system, it is provided with advance presets identification application in a computer, in the operating system of computer and default identification is using all Under starting state, methods described includes:
Detect and whether there is the first profile with the first preset features under the first preset catalogue;
If in the presence of the first profile, stored and set before os starting according to first profile acquisition The first position information of first slot of standby insertion;
The second profile under the catalogue of the first profile is obtained, and is obtained according to second profile and is inserted into institute First implementor name corresponding under the second preset catalogue of the storage device in the first slot is stated, first position letter is got with basis Breath and the first implementor name identify the storage device inserted in the first slot and the storage device are operated;
Methods described also includes:
Detect and whether there is the second profile with the second preset features under the first preset catalogue;
If in the presence of the second profile, the second of the slot that operating system hard disk inserts is obtained according to second profile Positional information;
The second place information is stored in the first preset configuration file, the first preset configuration text is read will pass through Part is to identify the position of the slot of insertion operation system disk.
2. the method as described in claim 1, it is characterised in that also include:
If the first profile is not present, by calling preset function to monitor the first feedback message, described first is anti- Feedback message when feedback message is the event generation for indicating storage device insertion;
If capturing first feedback information, according to first feedback message determine have storage device insert second insert Storage device in the second slot of the second place information of groove and insertion corresponding implementor name in systems.
3. method as claimed in claim 2, it is characterised in that also include:
By calling preset function to monitor the second feedback message, second feedback message is to indicate that storage device is pulled out The feedback message when event gone out occurs;
If capturing second feedback message, according to second feedback message determine have storage device extract the 3rd insert 3rd positional information of groove and the storage device corresponding implementor name in systems extracted from the 3rd slot.
4. method as claimed in claim 3, it is characterised in that also include:
Believe being monitored by the first feedback message to preset function and the second feedback message and the position of the slot determined Breath and the corresponding relation of preset slot numbering are stored in preset second configuration file, and second configuration is read will pass through The positional information of file acquisition slot.
5. a kind of identify the device of storage device inserted on computer slot, it is characterised in that the operating system of computer is Linux system, default identification application is installed in advance in a computer,
Described device includes:
First detection unit, in the case where the operating system of computer and default identification application are all in starting state, detection the It whether there is the first profile with the first preset features under one preset catalogue;
First acquisition unit, in the case where the first profile be present, then being obtained according to first profile Has the first position information of the first slot of storage device insertion before os starting;
Second acquisition unit, the second profile under catalogue for obtaining the first profile, and it is pre- according to described second Storage device first implementor name corresponding under the second preset catalogue that file acquisition is inserted into first slot is put, with root According to getting first position information and the first implementor name identifies the storage device inserted in the first slot and the storage is set It is standby to be operated;
Described device also includes:
Second detection unit, it whether there is the second preset text with the second preset features under the first preset catalogue for detecting Part;
3rd acquiring unit, in the case where the second profile be present, then being obtained and being grasped according to second profile Make the second place information of the slot of system disk insertion;
First memory cell, for the second place information to be stored in the first preset configuration file, read with will pass through The first preset configuration file is to identify the position of the slot of insertion operation system disk.
6. device as claimed in claim 5, it is characterised in that also include:
First monitoring unit, in the case of in the absence of the first profile, then by calling preset function anti-to first Feedback message is monitored, feedback message when first feedback message is the event generation for indicating storage device insertion;
First determining unit, for when capturing first feedback information, then determining to deposit according to first feedback message Storage device in the second slot of second place information and insertion of second slot of storage equipment insertion corresponding is in systems set Standby name.
7. device as claimed in claim 6, it is characterised in that also include:
Second monitoring unit, for by calling preset function to monitor the second feedback message, second feedback message Feedback message during to indicate that the event that storage device is extracted occurs;
Second determining unit, for when getting second feedback message, then determining to deposit according to second feedback message 3rd positional information of the 3rd slot that storage equipment is extracted and the storage device extracted from the 3rd slot corresponding are in systems set Standby name.
8. device as claimed in claim 7, it is characterised in that also include:
Second memory cell, for will be monitored by the first feedback message to preset function and the second feedback message and true The positional information of fixed slot and the corresponding relation of preset slot numbering are stored in preset second configuration file, will pass through Read the positional information that second configuration file obtains slot.
CN201410604781.5A 2014-10-31 2014-10-31 The method and device for the storage device inserted on identification computer slot Expired - Fee Related CN104407994B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410604781.5A CN104407994B (en) 2014-10-31 2014-10-31 The method and device for the storage device inserted on identification computer slot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410604781.5A CN104407994B (en) 2014-10-31 2014-10-31 The method and device for the storage device inserted on identification computer slot

Publications (2)

Publication Number Publication Date
CN104407994A CN104407994A (en) 2015-03-11
CN104407994B true CN104407994B (en) 2017-12-01

Family

ID=52645627

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410604781.5A Expired - Fee Related CN104407994B (en) 2014-10-31 2014-10-31 The method and device for the storage device inserted on identification computer slot

Country Status (1)

Country Link
CN (1) CN104407994B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109254935A (en) * 2018-08-17 2019-01-22 青岛海信电器股份有限公司 The recognition methods of smart television external storage equipment type and device
CN110308938B (en) * 2019-07-01 2022-03-22 青岛海信传媒网络技术有限公司 Management method and device for plugging and unplugging peripheral events
CN113608790A (en) * 2021-07-14 2021-11-05 深圳市科陆电子科技股份有限公司 Linux system based self-adaptive management method and system for serial device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685386A (en) * 2012-09-12 2014-03-26 北京百度网讯科技有限公司 Method and equipment for determining positional information of calculation equipment in complete machine cabinet
CN103763129A (en) * 2013-12-31 2014-04-30 华为技术有限公司 PCIe equipment management method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685386A (en) * 2012-09-12 2014-03-26 北京百度网讯科技有限公司 Method and equipment for determining positional information of calculation equipment in complete machine cabinet
CN103763129A (en) * 2013-12-31 2014-04-30 华为技术有限公司 PCIe equipment management method and device

Also Published As

Publication number Publication date
CN104407994A (en) 2015-03-11

Similar Documents

Publication Publication Date Title
CN106789386B (en) Wrong method and the error detector for network system on detection communication bus
CN104536855B (en) Fault detection method and device
CN104407994B (en) The method and device for the storage device inserted on identification computer slot
CN105306605B (en) A kind of double host server systems
CN103942124A (en) Method and device for data backup
CN102404603A (en) Method and system for detecting inserting and extracting states of USB device on set top box
CN106528409A (en) Application crash problem finding method and device
CN110399171A (en) A kind of hard disk management method, system and associated component
CN106095413A (en) The collocation method of a kind of bluetooth driver and device
CN107766726A (en) Application security detection method and device
CN106789973B (en) Page security detection method and terminal equipment
CN108140299B (en) History archive for live audio and method of using same
KR101741108B1 (en) Apparatus and method for analyzing system fault detection
CN106970851A (en) Method and apparatus for disk detection process in distributed file system
CN106776135A (en) A kind of data back up method and device
CN104268231A (en) File access method, device and intelligent file system
CN106775701B (en) Client automatic evidence obtaining method and system
CN109558288A (en) Detection method, device, system and the storage medium of NVME hard disk life-span
CN104932796B (en) A kind of control method and device of component drag and drop
CN108055159A (en) A kind of clustered node operation synchronous method and device
CN113051981B (en) Face recognition method and device
CN105808052A (en) File opening method and system
CN111722879A (en) USB flash disk identification method, Linux system, Linux equipment and readable storage medium
CN104683317B (en) UI data extraction method, client, server and system
JP2010049555A (en) Operation monitoring system and operation monitoring program

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20171201