mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
virrandommock: Drop virRandomGenerateWWN
After previous commit, there's no functional difference between real virRandomGenerateWWN() and the mocked version. Drop the mock then. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
ae7df11377
commit
d90a34cf29
@ -25,5 +25,5 @@ double virRandom(void);
|
|||||||
uint32_t virRandomInt(uint32_t max);
|
uint32_t virRandomInt(uint32_t max);
|
||||||
int virRandomBytes(unsigned char *buf, size_t buflen)
|
int virRandomBytes(unsigned char *buf, size_t buflen)
|
||||||
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE;
|
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE;
|
||||||
int virRandomGenerateWWN(char **wwn, const char *virt_type) G_NO_INLINE;
|
int virRandomGenerateWWN(char **wwn, const char *virt_type);
|
||||||
char *virRandomToken(size_t len);
|
char *virRandomToken(size_t len);
|
||||||
|
@ -47,14 +47,6 @@ uint64_t virRandomBits(int nbits)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int virRandomGenerateWWN(char **wwn,
|
|
||||||
const char *virt_type G_GNUC_UNUSED)
|
|
||||||
{
|
|
||||||
*wwn = g_strdup_printf("5100000%09llx",
|
|
||||||
(unsigned long long)virRandomBits(36));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#else /* WIN32 */
|
#else /* WIN32 */
|
||||||
/* Can't mock on WIN32 */
|
/* Can't mock on WIN32 */
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user