mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s3-rpc_client: add spoolss_driver_version_to_qword()
Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
This commit is contained in:
parent
56949a1c32
commit
2f4f9a086c
@ -91,6 +91,26 @@ bool spoolss_timestr_to_NTTIME(const char *str,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*******************************************************************
|
||||||
|
********************************************************************/
|
||||||
|
|
||||||
|
bool spoolss_driver_version_to_qword(const char *str,
|
||||||
|
uint64_t *data)
|
||||||
|
{
|
||||||
|
unsigned int v1, v2, v3, v4;
|
||||||
|
|
||||||
|
if (sscanf(str, "%u.%u.%u.%u", &v1, &v2, &v3, &v4) != 4) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
*data = ((uint64_t)(v1 & 0xFFFF) << 48) +
|
||||||
|
((uint64_t)(v2 & 0xFFFF) << 32) +
|
||||||
|
((uint64_t)(v3 & 0xFFFF) << 16) +
|
||||||
|
(uint64_t)(v4 & 0xFFFF);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
|
@ -27,6 +27,8 @@ bool init_systemtime(struct spoolss_Time *r,
|
|||||||
time_t spoolss_Time_to_time_t(const struct spoolss_Time *r);
|
time_t spoolss_Time_to_time_t(const struct spoolss_Time *r);
|
||||||
bool spoolss_timestr_to_NTTIME(const char *str,
|
bool spoolss_timestr_to_NTTIME(const char *str,
|
||||||
NTTIME *data);
|
NTTIME *data);
|
||||||
|
bool spoolss_driver_version_to_qword(const char *str,
|
||||||
|
uint64_t *data);
|
||||||
WERROR pull_spoolss_PrinterData(TALLOC_CTX *mem_ctx,
|
WERROR pull_spoolss_PrinterData(TALLOC_CTX *mem_ctx,
|
||||||
const DATA_BLOB *blob,
|
const DATA_BLOB *blob,
|
||||||
union spoolss_PrinterData *data,
|
union spoolss_PrinterData *data,
|
||||||
|
Loading…
Reference in New Issue
Block a user