Changeset 77a194c in mainline for uspace/lib/c/include
- Timestamp:
- 2015-11-04T18:55:46Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 44183b98
- Parents:
- 5265eea4 (diff), bfcde8d (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/lib/c/include
- Files:
-
- 6 added
- 2 edited
- 3 moved
-
imath.h (moved) (moved from uspace/app/hdisk/input.h ) (2 diffs)
-
ipc/services.h (modified) (1 diff)
-
ipc/vbd.h (added)
-
ipc/vol.h (added)
-
str.h (modified) (1 diff)
-
types/label.h (added)
-
types/uuid.h (added)
-
types/vol.h (moved) (moved from uspace/app/hdisk/common.h ) (3 diffs)
-
uuid.h (added)
-
vbd.h (added)
-
vol.h (moved) (moved from uspace/app/hdisk/func_none.h ) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/imath.h
r5265eea4 r77a194c 1 1 /* 2 * Copyright (c) 201 2-2013 Dominik Taborsky2 * Copyright (c) 2015 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup hdisk29 /** @addtogroup libc 30 30 * @{ 31 31 */ 32 32 /** @file 33 * @brief Integer math functions 33 34 */ 34 35 35 #ifndef __INPUT_H__36 #define __INPUT_H__36 #ifndef LIBC_IMATH_H_ 37 #define LIBC_IMATH_H_ 37 38 38 #include < tinput.h>39 #include <stdint.h> 39 40 40 extern int get_input_line(tinput_t *, char **); 41 extern uint8_t get_input_uint8(tinput_t *); 42 extern uint32_t get_input_uint32(tinput_t *); 43 extern uint64_t get_input_uint64(tinput_t *); 44 extern size_t get_input_size_t(tinput_t *); 41 extern int ipow10_u64(unsigned, uint64_t *); 42 extern unsigned ilog10_u64(uint64_t); 45 43 46 44 #endif 45 46 /** 47 * @} 48 */ -
uspace/lib/c/include/ipc/services.h
r5265eea4 r77a194c 59 59 #define SERVICE_NAME_UDP "net/udp" 60 60 #define SERVICE_NAME_TCP "net/tcp" 61 #define SERVICE_NAME_VBD "vbd" 62 #define SERVICE_NAME_VOLSRV "volsrv" 61 63 62 64 #endif -
uspace/lib/c/include/str.h
r5265eea4 r77a194c 82 82 extern int str_cmp(const char *s1, const char *s2); 83 83 extern int str_lcmp(const char *s1, const char *s2, size_t max_len); 84 extern int str_casecmp(const char *s1, const char *s2); 85 extern int str_lcasecmp(const char *s1, const char *s2, size_t max_len); 84 86 85 87 extern bool str_test_prefix(const char *s, const char *p); -
uspace/lib/c/include/types/vol.h
r5265eea4 r77a194c 1 1 /* 2 * Copyright (c) 201 2-2013 Dominik Taborsky2 * Copyright (c) 2015 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup hdisk29 /** @addtogroup libc 30 30 * @{ 31 31 */ … … 33 33 */ 34 34 35 #ifndef __COMMON_H__36 #define __COMMON_H__35 #ifndef LIBC_TYPES_VOL_H_ 36 #define LIBC_TYPES_VOL_H_ 37 37 38 #include <libmbr.h> 39 #include <libgpt.h> 38 #include <async.h> 40 39 41 40 typedef enum { 42 LYT_NONE, 43 LYT_MBR, 44 LYT_GPT, 45 } layouts_t; 41 /** Partition is empty */ 42 vpc_empty, 43 /** Partition contains a recognized filesystem */ 44 vpc_fs, 45 /** Partition contains unrecognized data */ 46 vpc_unknown 47 } vol_part_cnt_t; 46 48 47 typedef union { 48 mbr_label_t *mbr; 49 gpt_label_t *gpt; 50 } label_data_t; 49 /** File system type */ 50 typedef enum { 51 fs_exfat, 52 fs_fat, 53 fs_minix, 54 fs_ext4 55 } vol_fstype_t; 51 56 52 typedef struct label { 53 layouts_t layout; 54 aoff64_t blocks; 55 service_id_t device; 56 label_data_t data; 57 unsigned int alignment; 58 int (* destroy_label)(struct label *); 59 int (* add_part)(struct label *, tinput_t *); 60 int (* delete_part)(struct label *, tinput_t *); 61 int (* new_label)(struct label *); 62 int (* print_parts)(struct label *); 63 int (* read_parts)(struct label *); 64 int (* write_parts)(struct label *); 65 int (* extra_funcs)(struct label *, tinput_t *); 66 } label_t; 57 #define VOL_FSTYPE_LIMIT (fs_ext4 + 1) 58 #define VOL_FSTYPE_DEFAULT fs_minix 59 60 /** Volume service */ 61 typedef struct vol { 62 /** Volume service session */ 63 async_sess_t *sess; 64 } vol_t; 65 66 /** Partition information */ 67 typedef struct { 68 /** Partition content type */ 69 vol_part_cnt_t pcnt; 70 /** Filesystem type */ 71 vol_fstype_t fstype; 72 } vol_part_info_t; 67 73 68 74 #endif 75 76 /** @} 77 */ -
uspace/lib/c/include/vol.h
r5265eea4 r77a194c 1 1 /* 2 * Copyright (c) 201 2-2013 Dominik Taborsky2 * Copyright (c) 2015 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup hdisk29 /** @addtogroup libc 30 30 * @{ 31 31 */ … … 33 33 */ 34 34 35 #ifndef __FUNC_NONE_H__36 #define __FUNC_NONE_H__35 #ifndef LIBC_VOL_H_ 36 #define LIBC_VOL_H_ 37 37 38 #include <async.h> 38 39 #include <loc.h> 39 #include <tinput.h> 40 #include "common.h" 40 #include <stdint.h> 41 #include <types/label.h> 42 #include <types/vol.h> 41 43 42 extern int construct_none_label(label_t *); 43 extern int add_none_part(label_t *, tinput_t *); 44 extern int delete_none_part(label_t *, tinput_t *); 45 extern int destroy_none_label(label_t *); 46 extern int new_none_label(label_t *); 47 extern int print_none_parts(label_t *); 48 extern int read_none_parts(label_t *); 49 extern int write_none_parts(label_t *); 50 extern int extra_none_funcs(label_t *, tinput_t *); 44 extern int vol_create(vol_t **); 45 extern void vol_destroy(vol_t *); 46 extern int vol_get_parts(vol_t *, service_id_t **, size_t *); 47 extern int vol_part_add(vol_t *, service_id_t); 48 extern int vol_part_info(vol_t *, service_id_t, vol_part_info_t *); 49 extern int vol_part_empty(vol_t *, service_id_t); 50 extern int vol_part_mkfs(vol_t *, service_id_t, vol_fstype_t); 51 51 52 52 #endif 53 54 /** @} 55 */
Note:
See TracChangeset
for help on using the changeset viewer.
