I used the fdisk command in Linux today and accidentally formatted the 512 USB flash drive. As a result, the USB flash drive is unavailable and becomes 0 bytes.
It cannot be used back in windows, and it cannot be formatted. What should I do?
I searched a lot of USB
Method one, System automatic repair method
Right-click the U disk, select the tool in the properties, and start checking for automatic repair and recovery to see if it can be repaired.
Method Two, tool software method
We can try to use the Usboot tool on the appearance of the U disk Display 0 bytes of the USB disk to repair, after the operation in HDD mode on the U disk forced format. Here, press it to dial down and insert the U disk. Use this step
-storage: devicescan complete \ n ");
936
937/* shocould we unbind if no devices weredetected? */
938}
939
940 scsi_host_put (us_to_host (us ));
941 complete_and_exit ( threads_gone, 0 );
942}
Row 3, where does delay_use come from? In the same file, a static variable is defined at the beginning:
110 static unsigned int delay_use = 5;
111 module_param (delay_use, uint, S_IRUGO | S_IWUSR );
112 MOD
unsigned int delay_use = 5;
111 module_param (delay_use, uint, s_irugo | s_iwusr );
112 module_parm_desc (delay_use, "seconds todelay before using a new device ");
Set delay_use to 5, while module_param is a macro provided by Linux kernel 2.6, so that delay_use can be set when the module is loaded. (If this parameter is not set, the value 5 indicates that a new device is waiting for a delay of 5 seconds .) Why latency? When the inserted USB flash
. To this end, the program must be modified. One idea is to open a thread and run the Recv. It doesn't matter if you stop it. The other idea is to change the sock to non-blocking. For details about the changes, see. red lines in the H file!
Int flags = fcntl (hotplug_sock, f_getfl, 0 );Fcntl (hotplug_sock, f_setfl, flags | o_nonblock );
When the kernel has no message, the Buf after Recv () is empty. After cross-compilation, the program runs well in ti
unsigned int delay_use = 5;
111 module_param (delay_use, uint, S_IRUGO | S_IWUSR );
112 MODULE_PARM_DESC (delay_use, "seconds todelay before using a new device ");
Set delay_use to 5, while module_param is a macro provided by Linux Kernel 2.6, so that delay_use can be set when the module is loaded. (If this parameter is not set, the value 5 indicates that a new device is waiting for a delay of 5 seconds .) Why latency? When the inserted USB flash
Get what we need from the two tables, and then the following code is expanded around the two pointers. (Unusual_dev and id) continue to read get_device_info (). Row 3: record unusual_dev in us. There is also such a member in us. After this is recorded...
Get what we need from the two tables, and then the following code is expanded around the two pointers. (Unusual_dev and id) continue to read get_device_info ().
Row
urb *);
Void (* func3) (struct urb *);
Another function is:
Typedef void (* usb_complete_t) (struct urb *);
Usb_complete_t func1;
Usb_complete_t func2;
Usb_complete_t func3;
As you can see, if you want to declare many function pointers, you can use typedef once and for all. it will be easy to declare them later. Therefore, we know that the complete in urb is a function pointer, which is set to point to the function usb_stor_blocking_completion (). Needless to say, this function will cert
Get what we need from the two tables, and then the following code is expanded around the two pointers. (Unusual_dev and id) continue to read get_device_info ().
Row 3: Record unusual_dev in us. There is also such a member in us. In this way, it will be easy to use after recording. Because us runs through the whole story, it is very convenient to access its members and can be accessed at any time, however, the us_unusual_dev_list and storage_usb_ids t
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.