Re: [PATCH BlueZ 2/3] client/player: use long long for off_t print

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Psykose,

On Wed, May 10, 2023 at 5:42 PM psykose <alice@xxxxxxxxx> wrote:
>
> %lld is guaranteed to be a 64-bit int, which we enforce via
> -D_FILE_OFFSET_BITS=64.
>
> Signed-off-by: psykose <alice@xxxxxxxxx>

We don't use Signed-off-by for userspace patches.

> ---
>  client/player.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/client/player.c b/client/player.c
> index 7719076c8..856997319 100644
> --- a/client/player.c
> +++ b/client/player.c
> @@ -3578,7 +3578,7 @@ static int transport_send_seq(struct transport *transport, int fd, uint32_t num)
>
>                 offset = lseek(fd, 0, SEEK_CUR);
>
> -               bt_shell_echo("[seq %d %d.%03ds] send: %zd/%zd bytes",
> +               bt_shell_echo("[seq %d %d.%03ds] send: %lld/%lld bytes",
>                                 transport->seq, secs,
>                                 (nsecs + 500000) / 1000000,
>                                 offset, transport->stat.st_size);
> --
> 2.40.1

Perhaps we just promote offset to intmax_t and then print with %jd,
that way it should work regardless of the actual size of off_t.

-- 
Luiz Augusto von Dentz




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux