• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/router/udev/extras/volume_id/lib/

Lines Matching refs:id

116  * @id: Probing context.
124 int volume_id_get_label(struct volume_id *id, const char **label)
126 if (id == NULL)
130 if (id->usage_id == VOLUME_ID_UNUSED)
133 *label = id->label;
139 * @id: Probing context.
148 int volume_id_get_label_raw(struct volume_id *id, const uint8_t **label, size_t *len)
150 if (id == NULL)
156 if (id->usage_id == VOLUME_ID_UNUSED)
159 *label = id->label_raw;
160 *len = id->label_raw_len;
166 * @id: Probing context.
173 int volume_id_get_uuid(struct volume_id *id, const char **uuid)
175 if (id == NULL)
179 if (id->usage_id == VOLUME_ID_UNUSED)
182 *uuid = id->uuid;
188 * @id: Probing context.
197 int volume_id_get_uuid_raw(struct volume_id *id, const uint8_t **uuid, size_t *len)
199 if (id == NULL)
205 if (id->usage_id == VOLUME_ID_UNUSED)
208 *uuid = id->uuid_raw;
209 *len = id->uuid_raw_len;
215 * @id: Probing context.
222 int volume_id_get_usage(struct volume_id *id, const char **usage)
224 if (id == NULL)
228 if (id->usage_id == VOLUME_ID_UNUSED)
231 *usage = id->usage;
237 * @id: Probing context
244 int volume_id_get_type(struct volume_id *id, const char **type)
246 if (id == NULL)
250 if (id->usage_id == VOLUME_ID_UNUSED)
253 *type = id->type;
259 * @id: Probing context.
266 int volume_id_get_type_version(struct volume_id *id, const char **type_version)
268 if (id == NULL)
272 if (id->usage_id == VOLUME_ID_UNUSED)
275 *type_version = id->type_version;
335 * @id: Probing context.
343 int volume_id_probe_raid(struct volume_id *id, uint64_t off, uint64_t size)
347 if (id == NULL)
354 if (prober_raid[i].prober(id, off, size) == 0)
360 volume_id_free_buffer(id);
366 * @id: Probing context.
374 int volume_id_probe_filesystem(struct volume_id *id, uint64_t off, uint64_t size)
378 if (id == NULL)
385 if (prober_filesystem[i].prober(id, off, size) == 0)
391 volume_id_free_buffer(id);
397 * @id: Probing context.
405 int volume_id_probe_all(struct volume_id *id, uint64_t off, uint64_t size)
407 if (id == NULL)
411 if (volume_id_probe_raid(id, off, size) == 0)
414 if (volume_id_probe_filesystem(id, off, size) == 0)
423 * @id: Context passed to prober function.
431 struct volume_id *id, uint64_t off, uint64_t size,
440 if (all_probers_fn(prober_raid[i].prober, id, off, size, data) != 0)
443 if (all_probers_fn(prober_filesystem[i].prober, id, off, size, data) != 0)
451 * @id: Probing context.
460 struct volume_id *id;
462 id = malloc(sizeof(struct volume_id));
463 if (id == NULL)
465 memset(id, 0x00, sizeof(struct volume_id));
467 id->fd = fd;
469 return id;
474 struct volume_id *id;
483 id = volume_id_open_fd(fd);
484 if (id == NULL)
488 id->fd_close = 1;
490 return id;
495 * @id: Probing context.
499 void volume_id_close(struct volume_id *id)
501 if (id == NULL)
504 if (id->fd_close != 0)
505 close(id->fd);
507 volume_id_free_buffer(id);
509 free(id);