| 107 | /*! @endcond */ |
| 108 | |
| 109 | static archive_fsdevice *archiveFindDevice(const char *name) |
| 110 | { |
| 111 | u32 i; |
| 112 | u32 total = sizeof(archive_devices) / sizeof(archive_fsdevice); |
| 113 | archive_fsdevice *device = NULL; |
| 114 | |
| 115 | if(!archive_initialized) |
| 116 | return NULL; |
| 117 | |
| 118 | for(i=0; i<total; i++) |
| 119 | { |
| 120 | device = &archive_devices[i]; |
| 121 | |
| 122 | if(name==NULL) //Find an unused device entry. |
| 123 | { |
| 124 | if(!device->setup) |
| 125 | return device; |
| 126 | } |
| 127 | else if(device->setup) //Find the device with the input name. |
| 128 | { |
| 129 | size_t devnamelen = strlen(device->name); |
| 130 | if(strncmp(device->name, name, devnamelen)==0 && (name[devnamelen]=='\0' || name[devnamelen]==':')) |
| 131 | return device; |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | return NULL; |
| 136 | } |
| 137 | |
| 138 | static const char* |
| 139 | archive_fixpath(struct _reent *r, |
no outgoing calls
no test coverage detected