Changeset 1069714 in mainline
- Timestamp:
- 2011-09-28T17:18:58Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- eb91db7
- Parents:
- 8c9e71a (diff), 0f3744d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/port.c
r8c9e71a r1069714 224 224 if (rc != EOK) { 225 225 usb_log_error( 226 "Failed to set port % dpower after OC:"226 "Failed to set port %zu power after OC:" 227 227 " %s.\n", port->port_number, str_error(rc)); 228 228 } … … 306 306 if (rc != EOK) { 307 307 usb_log_error( 308 "Failed to clear port % dreset change feature: %s.\n",308 "Failed to clear port %zu reset change feature: %s.\n", 309 309 port->port_number, str_error(rc)); 310 310 } -
uspace/drv/bus/usb/usbhub/usbhub.c
r8c9e71a r1069714 307 307 const size_t configuration_count = 308 308 usb_device->descriptors.device.configuration_count; 309 usb_log_debug("Hub has % dconfigurations.\n", configuration_count);309 usb_log_debug("Hub has %zu configurations.\n", configuration_count); 310 310 311 311 if (configuration_count < 1) { … … 358 358 usb_log_warning( 359 359 "HUB OVER-CURRENT GONE: Cannot power on " 360 "port % d; %s\n",360 "port %zu; %s\n", 361 361 port, str_error(opResult)); 362 362 } -
uspace/srv/fs/fat/fat.h
r8c9e71a r1069714 141 141 } __attribute__ ((packed)) fat_bs_t; 142 142 143 #define FAT32_FSINFO_SIG1 "RRaA" 144 #define FAT32_FSINFO_SIG2 "rrAa" 145 #define FAT32_FSINFO_SIG3 "\x00\x00\x55\xaa" 146 147 typedef struct { 148 uint8_t sig1[4]; 149 uint8_t res1[480]; 150 uint8_t sig2[4]; 151 uint32_t free_clusters; 152 uint32_t last_allocated_cluster; 153 uint8_t res2[12]; 154 uint8_t sig3[4]; 155 } __attribute__ ((packed)) fat32_fsinfo_t; 156 143 157 typedef enum { 144 158 FAT_INVALID, -
uspace/srv/fs/fat/fat_ops.c
r8c9e71a r1069714 1025 1025 } 1026 1026 1027 static int fat_update_fat32_fsinfo(service_id_t service_id) 1028 { 1029 fat_bs_t *bs; 1030 fat32_fsinfo_t *info; 1031 block_t *b; 1032 int rc; 1033 1034 bs = block_bb_get(service_id); 1035 assert(FAT_IS_FAT32(bs)); 1036 1037 rc = block_get(&b, service_id, uint16_t_le2host(bs->fat32.fsinfo_sec), 1038 BLOCK_FLAGS_NONE); 1039 if (rc != EOK) 1040 return rc; 1041 1042 info = (fat32_fsinfo_t *) b->data; 1043 1044 if (bcmp(info->sig1, FAT32_FSINFO_SIG1, sizeof(info->sig1)) || 1045 bcmp(info->sig2, FAT32_FSINFO_SIG2, sizeof(info->sig2)) || 1046 bcmp(info->sig3, FAT32_FSINFO_SIG3, sizeof(info->sig3))) { 1047 (void) block_put(b); 1048 return EINVAL; 1049 } 1050 1051 /* For now, invalidate the counter. */ 1052 info->free_clusters = host2uint16_t_le(-1); 1053 1054 b->dirty = true; 1055 return block_put(b); 1056 } 1057 1027 1058 static int fat_unmounted(service_id_t service_id) 1028 1059 { 1029 1060 fs_node_t *fn; 1030 1061 fat_node_t *nodep; 1031 int rc; 1062 fat_bs_t *bs; 1063 int rc; 1064 1065 bs = block_bb_get(service_id); 1032 1066 1033 1067 rc = fat_root_get(&fn, service_id); … … 1043 1077 (void) fat_node_put(fn); 1044 1078 return EBUSY; 1079 } 1080 1081 if (FAT_IS_FAT32(bs)) { 1082 /* 1083 * Attempt to update the FAT32 FS info. 1084 */ 1085 (void) fat_update_fat32_fsinfo(service_id); 1045 1086 } 1046 1087
Note:
See TracChangeset
for help on using the changeset viewer.