Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/conf.h
Show First 20 Lines • Show All 346 Lines • ▼ Show 20 Lines | struct dumperinfo { | ||||
off_t mediasize; /* Space available in bytes. */ | off_t mediasize; /* Space available in bytes. */ | ||||
/* MI kernel dump state. */ | /* MI kernel dump state. */ | ||||
void *blockbuf; /* Buffer for padding shorter dump blocks */ | void *blockbuf; /* Buffer for padding shorter dump blocks */ | ||||
off_t dumpoff; /* Offset of ongoing kernel dump. */ | off_t dumpoff; /* Offset of ongoing kernel dump. */ | ||||
off_t origdumpoff; /* Starting dump offset. */ | off_t origdumpoff; /* Starting dump offset. */ | ||||
struct kerneldumpcrypto *kdcrypto; /* Kernel dump crypto. */ | struct kerneldumpcrypto *kdcrypto; /* Kernel dump crypto. */ | ||||
struct kerneldumpcomp *kdcomp; /* Kernel dump compression. */ | struct kerneldumpcomp *kdcomp; /* Kernel dump compression. */ | ||||
TAILQ_ENTRY(dumperinfo) di_next; | |||||
char di_devname[]; | |||||
}; | }; | ||||
extern int dumping; /* system is dumping */ | extern int dumping; /* system is dumping */ | ||||
int doadump(boolean_t); | int doadump(boolean_t); | ||||
int set_dumper(struct dumperinfo *di, const char *devname, struct thread *td, | struct diocskerneldump_arg; | ||||
markj: Most of these parameters are extracted from a `diocskerneldump_arg`, why not just pass that… | |||||
Done Inline ActionsI didn't set out to rototill the interface that much. I don't have any good argument against doing so, though. I agree that passing a struct with arguments would be more sensible than 10s of parameters which can be easily misordered, and diocskerneldump_arg is probably the logical choice. I'll make that change. cem: I didn't set out to rototill the interface that much. I don't have any good argument against… | |||||
uint8_t compression, uint8_t encryption, const uint8_t *key, | int dumper_insert(const struct dumperinfo *di_template, const char *devname, | ||||
Done Inline ActionsSince you're rototiling the KPI, it might be nice to add a dumper_ namespace. That is, consider naming them dumper_insert() and dumper_remove() instead. markj: Since you're rototiling the KPI, it might be nice to add a `dumper_` namespace. That is… | |||||
Done Inline ActionsSure, that seems like a good idea to me. Will fix. cem: Sure, that seems like a good idea to me. Will fix. | |||||
uint32_t encryptedkeysize, const uint8_t *encryptedkey); | const struct diocskerneldump_arg *kda); | ||||
int clear_dumper(struct thread *td); | int dumper_remove(const char *devname, const struct diocskerneldump_arg *kda); | ||||
int dump_start(struct dumperinfo *di, struct kerneldumpheader *kdh); | int dump_start(struct dumperinfo *di, struct kerneldumpheader *kdh); | ||||
int dump_append(struct dumperinfo *, void *, vm_offset_t, size_t); | int dump_append(struct dumperinfo *, void *, vm_offset_t, size_t); | ||||
int dump_write(struct dumperinfo *, void *, vm_offset_t, off_t, size_t); | int dump_write(struct dumperinfo *, void *, vm_offset_t, off_t, size_t); | ||||
int dump_finish(struct dumperinfo *di, struct kerneldumpheader *kdh); | int dump_finish(struct dumperinfo *di, struct kerneldumpheader *kdh); | ||||
void dump_init_header(const struct dumperinfo *di, struct kerneldumpheader *kdh, | void dump_init_header(const struct dumperinfo *di, struct kerneldumpheader *kdh, | ||||
char *magic, uint32_t archver, uint64_t dumplen); | char *magic, uint32_t archver, uint64_t dumplen); | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#endif /* !_SYS_CONF_H_ */ | #endif /* !_SYS_CONF_H_ */ |
Most of these parameters are extracted from a diocskerneldump_arg, why not just pass that structure directly like with dumper_remove()?