LS_FLAG_ADMISSIBLE_ONLY = 2,
/** -r */
LS_FLAG_REVERSE = 4,
+ /** -d */
+ LS_FLAG_UNIXDATE = 8,
};
/**
goto out;
}
get_attribute_bitmap(&afsi->attributes, att_buf);
- ret = get_local_time(&afsi->last_played, last_played_time,
- sizeof(last_played_time), current_time, opts->mode);
- if (ret < 0)
- goto out;
+ if (opts->flags & LS_FLAG_UNIXDATE)
+ sprintf(last_played_time, "%llu",
+ (long long unsigned)afsi->last_played);
+ else {
+ ret = get_local_time(&afsi->last_played, last_played_time,
+ sizeof(last_played_time), current_time, opts->mode);
+ if (ret < 0)
+ goto out;
+ }
get_duration_buf(afhi->seconds_total, duration_buf, opts);
if (have_score) {
if (opts->mode == LS_MODE_LONG)
flags |= LS_FLAG_REVERSE;
continue;
}
+ if (!strcmp(arg, "-d")) {
+ flags |= LS_FLAG_UNIXDATE;
+ continue;
+ }
if (!strncmp(arg, "-s", 2)) {
if (!*(arg + 2) || *(arg + 3))
return -E_AFT_SYNTAX;
void aft_init(struct afs_table *t)
{
- t->name = audio_file_table_desc.name;
t->open = aft_open;
t->close = aft_close;
t->create = aft_create;