mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zipl-editenv: added zIPL multienvironment support
. Support multiple namespaces in the installed environment block; . Add option --site (-S) to specify a particular namespace when operating on the installed environment block; . Add option --effective-site (-E) to specify a particular namespace. When using in a combination with the option -l (--list), it displays zIPL environment that would take place if the specified namespace was activated at boot time; . Modify set/unset/reset/list operations over the installed environment block in the case when the option --site is specified Reviewed-by: Stefan Haberland <sth@linux.ibm.com> Signed-off-by: Eduard Shishkin <edward6@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
c6443cf977
commit
e97c85bb80
+25
-2
@@ -22,13 +22,36 @@
|
||||
#define ENVBLK_MAX_IMPORT_SIZE(envblk_size) \
|
||||
(envblk_size - sizeof(ZIPL_ENVBLK_SIGNATURE) + 1)
|
||||
|
||||
/* get name by prefixed name PNAME and by logical prefix P */
|
||||
static inline const char *get_name(const char *p, const char *pname)
|
||||
{
|
||||
return p ? pname + strlen(p) : pname;
|
||||
}
|
||||
|
||||
/* get name length by prefixed name PNAME and by logical prefix P */
|
||||
static inline size_t get_name_len(const char *p, const char *pname)
|
||||
{
|
||||
return p ? strlen(pname) - strlen(p) : strlen(pname);
|
||||
}
|
||||
|
||||
int envblk_offset_get(int fd, off_t *off);
|
||||
int envblk_offset_set(int fd, off_t off);
|
||||
int envblk_size_get(int fd, int *size);
|
||||
int envblk_check_name(char *name, int len);
|
||||
int envblk_check_name(const char *name, int len);
|
||||
int envblk_import(char *from, char *to, int size);
|
||||
char *envblk_next_line(char *s, const char *end);
|
||||
int envblk_scan(char *envblk, unsigned int envblk_size,
|
||||
void (*actor)(char *name));
|
||||
int (*actor)(char *name, void *data), void *data);
|
||||
void envblk_print(char *envblk, unsigned int envblk_size);
|
||||
void envblk_create_blank(char *envblk, int envblk_len);
|
||||
void envblk_blank(char *envblk, int envblk_len);
|
||||
int envblk_list_site(char *envblk, unsigned int envblk_size, int site_id);
|
||||
int envblk_list_effective_site(char *envblk, unsigned int envblk_size,
|
||||
int site_id);
|
||||
int envblk_list_all(char *envblk, unsigned int envblk_size, int indent);
|
||||
int envblk_set(char *envblk, unsigned int envblk_size, const char *name,
|
||||
const char *new_val);
|
||||
int envblk_unset(char *envblk, int envblk_len, const char *pname,
|
||||
const char *site_id);
|
||||
int envblk_remove_namespace(char *envblk, unsigned int envblk_size,
|
||||
const char *site_id);
|
||||
|
||||
Reference in New Issue
Block a user